Skip to content

Build your personal knowledge base with Trilium Notes

chore(ts): allow link.createLink notePath type to accept undefined

Panagiotis Papadopoulos31170744d1ee
diff --git a/src/public/app/services/link.ts b/src/public/app/services/link.ts
index 472f7d37a6..9b3c779bb3 100644
--- a/src/public/app/services/link.ts
+++ b/src/public/app/services/link.ts
@@ -70,7 +70,7 @@ interface CreateLinkOptions {
viewScope?: ViewScope;
}
-async function createLink(notePath: string, options: CreateLinkOptions = {}) {
+async function createLink(notePath: string | undefined, options: CreateLinkOptions = {}) {
if (!notePath || !notePath.trim()) {
logError("Missing note path");