fix: shadowing state variable dans openEditor + imports manquants pour deleteFile
This commit is contained in:
parent
ac3fa10310
commit
c20a61f8ba
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user