From 954f38f39f1d7ce7644f9ac43b74f2d4b409d7b8 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 21 Jan 2021 13:20:44 +0000 Subject: [PATCH] Fix demo website --- docs/web/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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({