Reverse out bugfix.
This commit is contained in:
parent
6452a0c7f4
commit
8f8027d573
1 changed files with 1 additions and 10 deletions
|
|
@ -24,16 +24,7 @@ var ShapeShift = (function() {
|
||||||
var parsedResponse = JP(xmlhttp.responseText);
|
var parsedResponse = JP(xmlhttp.responseText);
|
||||||
cb.apply(null, [parsedResponse]);
|
cb.apply(null, [parsedResponse]);
|
||||||
} else {
|
} else {
|
||||||
var cbResponse = new Error('Request Failed');
|
cb.apply(null, [new Error('Request Failed')]);
|
||||||
if (xmlhttp.status === 500) {
|
|
||||||
try {
|
|
||||||
var errorResponse = JSON.parse(xmlhttp.responseText);
|
|
||||||
if (typeof errorResponse.error === 'string') {
|
|
||||||
cbResponse = errorResponse;
|
|
||||||
}
|
|
||||||
} catch (e) { /* nop */ }
|
|
||||||
}
|
|
||||||
cb.apply(null, [cbResponse]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue