changeset 2707:4125da39666e

Merge branch 'master' into vnext
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Mon, 20 Mar 2017 16:22:11 +0000
parents 8f485581ee73 (current diff) 2f2aaef246af (diff)
children 2395223deef2
files js/core.js
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/js/core.js	Fri Mar 17 11:25:27 2017 +0000
+++ b/js/core.js	Mon Mar 20 16:22:11 2017 +0000
@@ -435,11 +435,11 @@
             } else {
                 var parser = new DOMParser();
                 var xmlDoc = parser.parseFromString(xmlhttp.responseText, "application/xml");
-                var response = xmlDoc.firstElementChild;
-                if (response.nodeName == "response" && response.getAttribute("state") == "OK") {
+                var response = xmlDoc.getElementsByTagName('response')[0];
+                if (response.getAttribute("state") == "OK") {
                     window.onbeforeunload = undefined;
                     var file = response.getElementsByTagName("file")[0];
-                    console.log("Save: OK, written " + file.getAttribute("bytes") + "B");
+                    console.log("Intermediate save: OK, written " + file.getAttribute("bytes") + "B");
                     if (typeof specification.returnURL == "string" && specification.returnURL.length > 0) {
                         window.location = specification.returnURL;
                     } else {