Mercurial > hg > webaudioevaluationtool
diff ape.js @ 1603:5cfa9b3e8d03
Bug #1255: Will show a console warning if projectReturn is not set and assume projectReturn is "null".
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Fri, 29 May 2015 16:33:50 +0100 |
parents | 503ba0ff72c2 |
children | 20823d1467b1 |
line wrap: on
line diff
--- a/ape.js Fri May 29 16:27:05 2015 +0100 +++ b/ape.js Fri May 29 16:33:50 2015 +0100 @@ -179,7 +179,13 @@ pagetitle.appendChild(titleSpan); // Store the return URL path in global projectReturn - projectReturn = xmlSetup[0].attributes['projectReturn'].value; + projectReturn = xmlSetup[0].attributes['projectReturn']; + if (projectReturn == undefined) { + console.log("WARNING - projectReturn not specified! Will assume null."); + projectReturn = "null"; + } else { + projectReturn = projectReturn.value; + } // Create Interface buttons! var interfaceButtons = document.createElement('div');