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

it can also accept undefined -> it is even handled in that first if block.
change required for upcoming port of attachment_*.js files
This commit is contained in:
Panagiotis Papadopoulos 2025-02-22 16:46:23 +01:00
parent 1dfa4a8bc2
commit 31170744d1

View File

@ -70,7 +70,7 @@ interface CreateLinkOptions {
viewScope?: ViewScope; viewScope?: ViewScope;
} }
async function createLink(notePath: string, options: CreateLinkOptions = {}) { async function createLink(notePath: string | undefined, options: CreateLinkOptions = {}) {
if (!notePath || !notePath.trim()) { if (!notePath || !notePath.trim()) {
logError("Missing note path"); logError("Missing note path");