Skip to content

Commit

Permalink
fix: Fixed openNoteAtPath (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
shd101wyy authored Feb 28, 2021
1 parent bc781b0 commit 7fdd325
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/containers/crossnote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,11 @@ function useCrossnoteContainer(initialState: InitialState) {
if (!filePath.endsWith(".md")) {
filePath += ".md";
}
// This is necessary to guarantee that an existing note will not be overwritten before the notebook is fully loaded
await notebook.refreshNotesIfNotLoaded({
dir: "./",
includeSubdirectories: true,
});
let note: Note;
if (filePath in notebook.notes) {
note = notebook.notes[filePath];
Expand Down

0 comments on commit 7fdd325

Please sign in to comment.