Skip to content

Commit 79c916d

Browse files
committed
fix tests
1 parent 024ce34 commit 79c916d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/RESTController.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ const RESTController = {
9999
if (xhr.status >= 200 && xhr.status < 300) {
100100
var response;
101101
try {
102+
response = JSON.parse(xhr.responseText);
103+
102104
if (typeof xhr.getResponseHeader === 'function') {
103105
var jobStatusId = xhr.getResponseHeader('x-parse-job-status-id');
104106
if (jobStatusId) {
105107
response = jobStatusId;
106108
}
107-
} else {
108-
response = JSON.parse(xhr.responseText);
109109
}
110110
} catch (e) {
111111
promise.reject(e.toString());

0 commit comments

Comments
 (0)