fix: shadowing state variable dans openEditor + imports manquants pour deleteFile
All checks were successful
CI / lint (push) Successful in 15s
CI / security (push) Successful in 8s
CI / test (push) Successful in 15s
CI / build (push) Successful in 2s

This commit is contained in:
Bruno Charest 2026-05-29 21:11:27 -04:00
parent ac3fa10310
commit c20a61f8ba

View File

@ -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) {