From ac3fa1031049cb7b7908aa529e595c220c988dee Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Fri, 29 May 2026 21:01:30 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20editorVault=E2=86=92state.editorVault=20?= =?UTF-8?q?+=20openFile=20import=20=E2=80=94=20bouton=20sauvegarde=20?= =?UTF-8?q?=C3=A9diteur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/js/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/js/utils.js b/frontend/js/utils.js index ec522bb..ef8bfdd 100644 --- a/frontend/js/utils.js +++ b/frontend/js/utils.js @@ -1,5 +1,6 @@ import { state } from './state.js'; import { api } from './auth.js'; +import { openFile } from './viewer.js'; // --------------------------------------------------------------------------- // File extension → Lucide icon mapping @@ -424,7 +425,7 @@ async function saveFile() { setTimeout(() => { closeEditor(); - if (state.currentVault === editorVault && state.currentPath === state.editorPath) { + if (state.currentVault === state.editorVault && state.currentPath === state.editorPath) { openFile(state.currentVault, state.currentPath); } }, 800); @@ -438,7 +439,7 @@ async function saveFile() { } async function deleteFile() { - if (!editorVault || !state.editorPath) return; + if (!state.editorVault || !state.editorPath) return; const deleteBtn = document.getElementById("editor-delete"); const originalHTML = deleteBtn.innerHTML;