From 449f2aacc7a89df06465e9b30c4df9eb39c19205 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Wed, 11 Sep 2024 19:11:20 +0800 Subject: style: reformat code --- src/editor.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/editor.mjs b/src/editor.mjs index 107743b..783e654 100644 --- a/src/editor.mjs +++ b/src/editor.mjs @@ -82,9 +82,9 @@ cm.on("change", () => { // }}} // Reload editor content by hash value -onhashchange = () => { - const contentFromHash = getContentFromHash() - if (contentFromHash) editor.value(contentFromHash) +window.onhashchange = () => { + const content = getContentFromHash(window.location.hash) + if (content) editor.value(content) } // FIXME DEBUGONLY @@ -259,7 +259,7 @@ const getSuggestions = (anchor) => { }) .catch(() => { markInputIsInvalid(lineWithRenderer) - console.warn(`Fail to get valid options from renderer with URL ${rendererUrl}` ) + console.warn(`Fail to get valid options from renderer with URL ${rendererUrl}`) }) return [] } -- cgit v1.2.3-70-g09d2