# HG changeset patch # User Nicholas Jillings # Date 1550750494 0 # Node ID 735d96d343f6ca621a3a256b210da5e90fe28be3 # Parent ebe6a4c986350f9144fbf70edbd67382fd155cc1 Fixed #287 diff -r ebe6a4c98635 -r 735d96d343f6 js/core.js --- a/js/core.js Thu Feb 21 11:52:09 2019 +0000 +++ b/js/core.js Thu Feb 21 12:01:34 2019 +0000 @@ -1160,13 +1160,12 @@ this.proceedClicked = function () { // Each time the popup button is clicked! - if (testState.stateIndex === -1 && specification.calibration) { - advanceState(); - return; - } var node = this.popupOptions[this.currentIndex], pass = true, timeDelta = (new Date() - lastNodeStart) / 1000.0; + if (node == undefined) { + advanceState(); + } if (timeDelta < node.specification.minWait) { interfaceContext.lightbox.post("Error", "Not enough time has elapsed, please wait " + (node.specification.minWait - timeDelta).toFixed(0) + " seconds"); return; @@ -1202,7 +1201,6 @@ this.store.postResult(node); }, this); this.store.complete(); - testState.stateIndex++; advanceState(); } }; @@ -1370,10 +1368,10 @@ storage.update(); } if (this.stateIndex == -2) { + this.stateIndex++; if (this.preTestSurvey !== undefined) { popup.initState(this.preTestSurvey, storage.globalPreTest); } else { - this.stateIndex++; this.advanceState(); } } else if (this.stateIndex == -1) {