Skip to content

Build your personal knowledge base with Trilium Notes

fix(client/ts): build error

Elian Doranbe93380d03b5
diff --git a/src/public/app/services/note_create.ts b/src/public/app/services/note_create.ts
index 24fd438557..b44bbcabb5 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 f5f7bd4d8f..f2490278ee 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;
}