diff --git a/src/public/app/services/note_create.ts b/src/public/app/services/note_create.ts index 24fd43855..b44bbcabb 100644 --- a/src/public/app/services/note_create.ts +++ b/src/public/app/services/note_create.ts @@ -40,7 +40,7 @@ interface DuplicateResponse { note: FNote; } -async function createNote(parentNotePath: string, options: CreateNoteOpts = {}) { +async function createNote(parentNotePath: string | undefined, options: CreateNoteOpts = {}) { options = Object.assign({ activate: true, focus: 'title', diff --git a/src/public/app/services/tree.ts b/src/public/app/services/tree.ts index f5f7bd4d8..f2490278e 100644 --- a/src/public/app/services/tree.ts +++ b/src/public/app/services/tree.ts @@ -149,7 +149,7 @@ function getParentProtectedStatus(node: Node) { return hoistedNoteService.isHoistedNode(node) ? false : node.getParent().data.isProtected; } -function getNoteIdFromUrl(urlOrNotePath: string) { +function getNoteIdFromUrl(urlOrNotePath: string | undefined) { if (!urlOrNotePath) { return null; }