From 4d0a7df486c1d281f5ca580ea7ef8e469257c6c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20J=C3=B8rgensen?= Date: Thu, 17 Jul 2014 15:04:24 +0200 Subject: [PATCH 1/2] Made a null-error-object a non-error --- js/h5p-content-upgrade.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/h5p-content-upgrade.js b/js/h5p-content-upgrade.js index 9318c9f..75e304a 100644 --- a/js/h5p-content-upgrade.js +++ b/js/h5p-content-upgrade.js @@ -77,7 +77,7 @@ */ var check = function (err) { i++; - if (i === (isArray ? obj.length : ids.length) || err !== undefined) { + if (i === (isArray ? obj.length : ids.length) || (err !== undefined && err !== null)) { finished(err); } else { From 9b46c8a173d58910b4eb025416f357263fb8fba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20J=C3=B8rgensen?= Date: Fri, 18 Jul 2014 10:50:23 +0200 Subject: [PATCH 2/2] Bugfixes --- js/h5p-content-upgrade.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/h5p-content-upgrade.js b/js/h5p-content-upgrade.js index 75e304a..d23ed24 100644 --- a/js/h5p-content-upgrade.js +++ b/js/h5p-content-upgrade.js @@ -1,3 +1,5 @@ +var H5PUpgrades = H5PUpgrades || {}; + (function ($) { var info, $container; @@ -168,7 +170,7 @@ ContentUpgrade.prototype.nextBatch = function (outData) { var self = this; - $.post(info.url, outData, function (inData) { + $.post(info.infoUrl, outData, function (inData) { if (!(inData instanceof Object)) { // Print errors from backend return self.setStatus(inData);