reject request if reject is actually defined, fix #165

pull/173/head
Martin Zimmermann 9 years ago
parent 0466977109
commit 957fc72eb1

@ -52,7 +52,9 @@ define(["app/lib/promise", "app/globals"], function(Q, globals) {
}
if (xhr.status >= 500) {
reject(xhr.body);
if (reject) {
reject(xhr.body);
}
} else {
resolve({status: xhr.status, body: xhr.responseText});
}

Loading…
Cancel
Save