From 957fc72eb15a6de56bdd4960d4078fd917ab42ea Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Tue, 24 Feb 2015 21:37:57 +0100 Subject: [PATCH] reject request if reject is actually defined, fix #165 --- isso/js/app/api.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/isso/js/app/api.js b/isso/js/app/api.js index 5480245..d0fbf2f 100644 --- a/isso/js/app/api.js +++ b/isso/js/app/api.js @@ -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}); }