Update ExcalidrawViewUtils.ts

This commit is contained in:
zsviczian
2024-09-12 11:41:47 +02:00
committed by GitHub
parent 904bc7c994
commit 7c91186ed5

View File

@@ -129,8 +129,9 @@ export function openExternalLink (link:string, app: App, element?: ExcalidrawEle
* the link to the file path. By default as a wiki link, or as a file path if returnWikiLink is false.
*/
export function parseObsidianLink(link: string, app: App, returnWikiLink: boolean = true): boolean | string {
if(!link) return false;
link = getLinkFromMarkdownLink(link);
if (!link.startsWith("obsidian://")) {
if (!link?.startsWith("obsidian://")) {
return false;
}
const url = new URL(link);
@@ -394,4 +395,4 @@ export function isTextImageTransclusion (
}
}
return false;
}
}