From cdb80969e186404dc56761e844a3efcb065192cc Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sun, 13 Oct 2024 16:03:39 +0800 Subject: refactor: add
for contents --- src/editor.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/editor.mjs') diff --git a/src/editor.mjs b/src/editor.mjs index ad1a863..f6c7dab 100644 --- a/src/editor.mjs +++ b/src/editor.mjs @@ -32,7 +32,7 @@ new window.MutationObserver(mutaions => { const mutation = mutaions.at(-1) const layout = dumbyContainer.dataset.layout if (layout !== 'normal' || mutation.oldValue === 'normal') { - delete context.dataset.mode + context.dataset.mode = '' } }).observe(dumbyContainer, { attributes: true, @@ -92,7 +92,7 @@ new window.MutationObserver(() => { const toggleEditing = () => { const mode = context.dataset.mode if (mode === 'editing') { - delete context.dataset.mode + context.dataset.mode = '' } else { context.dataset.mode = 'editing' } -- cgit v1.2.3-70-g09d2