From 87b6a82df8bb2588a37ea5b76027d3a6b6228ef2 Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Fri, 29 May 2026 20:41:43 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20editorView/editorVault=20=E2=86=92=20sta?= =?UTF-8?q?te.editorView/state.editorVault=20dans=20saveFile()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/js/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/js/utils.js b/frontend/js/utils.js index 0493ad2..ec522bb 100644 --- a/frontend/js/utils.js +++ b/frontend/js/utils.js @@ -397,9 +397,9 @@ function closeEditor() { } async function saveFile() { - if ((!editorView && !state.fallbackEditorEl) || !editorVault || !state.editorPath) return; + if ((!state.editorView && !state.fallbackEditorEl) || !state.editorVault || !state.editorPath) return; - const content = editorView ? state.editorView.state.doc.toString() : state.fallbackEditorEl.value; + const content = state.editorView ? state.editorView.state.doc.toString() : state.fallbackEditorEl.value; const saveBtn = document.getElementById("editor-save"); const originalHTML = saveBtn.innerHTML;