# HG changeset patch # User Nicholas Jillings # Date 1458572517 0 # Node ID b1675f657e3c455dbc9b8ca80f0ad37505722ae5 # Parent af79a7f6a38ba7dd662541ffd71252ac4d27643a Fix for #1560. Fix for loadProjectSpecCallback error if Parser returns undefined. diff -r af79a7f6a38b -r b1675f657e3c core.js --- a/core.js Mon Mar 21 14:31:43 2016 +0000 +++ b/core.js Mon Mar 21 15:01:57 2016 +0000 @@ -182,6 +182,16 @@ document.getElementsByTagName('body')[0].appendChild(errorNode[0]); return; } + if (responseDocument == undefined) { + var msg = document.createElement("h3"); + msg.textContent = "FATAL ERROR"; + var span = document.createElement("span"); + span.textContent = "The project XML was not decoded properly, try refreshing your browser and clearing caches. If the problem persists, contact the test creator."; + document.getElementsByTagName('body')[0].innerHTML = null; + document.getElementsByTagName('body')[0].appendChild(msg); + document.getElementsByTagName('body')[0].appendChild(span); + return; + } if (responseDocument.children[0].nodeName == "waet") { // document is a specification @@ -844,11 +854,8 @@ } for (var i=0; i - + (1) Very Annoying