From c20a61f8bad95c5f62ca7e6c72fd6592c5667ade Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Fri, 29 May 2026 21:11:27 -0400 Subject: [PATCH] fix: shadowing state variable dans openEditor + imports manquants pour deleteFile --- frontend/js/utils.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/js/utils.js b/frontend/js/utils.js index ef8bfdd..616a35d 100644 --- a/frontend/js/utils.js +++ b/frontend/js/utils.js @@ -1,6 +1,7 @@ import { state } from './state.js'; import { api } from './auth.js'; -import { openFile } from './viewer.js'; +import { openFile, showWelcome } from './viewer.js'; +import { refreshSidebarForContext, refreshTagsForContext } from './sidebar.js'; // --------------------------------------------------------------------------- // File extension → Lucide icon mapping @@ -353,13 +354,13 @@ async function openEditor(vaultName, filePath) { extensions.push(oneDark); } - const state = EditorState.create({ + const cmState = EditorState.create({ doc: rawData.raw, extensions: extensions, }); state.editorView = new EditorView({ - state: state, + state: cmState, parent: bodyEl, }); } catch (err) {