Skip to content

Commit 7fdd325

Browse files
authored
fix: Fixed openNoteAtPath (#199)
1 parent bc781b0 commit 7fdd325

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/containers/crossnote.ts

+5
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,11 @@ function useCrossnoteContainer(initialState: InitialState) {
368368
if (!filePath.endsWith(".md")) {
369369
filePath += ".md";
370370
}
371+
// This is necessary to guarantee that an existing note will not be overwritten before the notebook is fully loaded
372+
await notebook.refreshNotesIfNotLoaded({
373+
dir: "./",
374+
includeSubdirectories: true,
375+
});
371376
let note: Note;
372377
if (filePath in notebook.notes) {
373378
note = notebook.notes[filePath];

0 commit comments

Comments
 (0)