# HG changeset patch # User Nicholas Jillings # Date 1463407594 -3600 # Node ID 66cbd68a4ed09de6b457fb32144d301ce5245f4d # Parent dee115f3efeeea9249f7ffd8b540e414b439e61c Fix for #67 diff -r dee115f3efee -r 66cbd68a4ed0 js/core.js --- a/js/core.js Mon May 16 14:35:14 2016 +0100 +++ b/js/core.js Mon May 16 15:06:34 2016 +0100 @@ -1044,7 +1044,9 @@ if (this.stateIndex == null) { this.initialise(); } - storage.update(); + if (this.stateIndex > -2) { + storage.update(); + } if (this.stateIndex == -2) { this.stateIndex++; if (this.preTestSurvey != null) @@ -2990,6 +2992,10 @@ this.request.send(); }, update: function() { + if (this.key == null) { + console.log("Cannot save as key == null"); + return; + } this.parent.root.setAttribute("state","update"); var xmlhttp = new XMLHttpRequest(); var returnURL = "";