Skip to content

Commit de4be53

Browse files
authored
Merge 6e95f04 into e36ddaf
2 parents e36ddaf + 6e95f04 commit de4be53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ParseObject.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ class ParseObject {
12191219
try {
12201220
await this.save(null, options);
12211221
} catch (e) {
1222-
if (e.message === 'XMLHttpRequest failed: "Unable to connect to the Parse API"') {
1222+
if (e.code === ParseError.CONNECTION_FAILED) {
12231223
await EventuallyQueue.save(this, options);
12241224
EventuallyQueue.poll();
12251225
}
@@ -1363,7 +1363,7 @@ class ParseObject {
13631363
try {
13641364
await this.destroy(options);
13651365
} catch (e) {
1366-
if (e.message === 'XMLHttpRequest failed: "Unable to connect to the Parse API"') {
1366+
if (e.code === ParseError.CONNECTION_FAILED) {
13671367
await EventuallyQueue.destroy(this, options);
13681368
EventuallyQueue.poll();
13691369
}

0 commit comments

Comments
 (0)