diff --git a/docs/web/index.js b/docs/web/index.js index 0f65123..414d8ee 100644 --- a/docs/web/index.js +++ b/docs/web/index.js @@ -143,17 +143,15 @@ demoSelector.addEventListener("change", function() { loadDemo(demoSelector.value); }); - let queryCode = getQueryVariable("code"); -if (queryCode !== "") { +if (queryCode !== null) { editor.updateCode(decodeURI(queryCode)); - demoSelector.value = "custom"; } else { loadDemo(demoKeys[0]); } let queryData = getQueryVariable("data"); -if (queryData !== "") { +if (queryData !== null) { db.default(decodeURI(queryCode)); } else { db.default({