reject request if reject is actually defined, fix #165
This commit is contained in:
parent
0466977109
commit
957fc72eb1
@ -52,7 +52,9 @@ define(["app/lib/promise", "app/globals"], function(Q, globals) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (xhr.status >= 500) {
|
if (xhr.status >= 500) {
|
||||||
|
if (reject) {
|
||||||
reject(xhr.body);
|
reject(xhr.body);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
resolve({status: xhr.status, body: xhr.responseText});
|
resolve({status: xhr.status, body: xhr.responseText});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user