From cf0e5f24bab83704c0df791283397f98b11e22a5 Mon Sep 17 00:00:00 2001 From: Muness Castle <931+muness@users.noreply.github.com> Date: Fri, 31 May 2024 13:50:38 -0400 Subject: [PATCH] Fix handling of undefined "ca-url" in frontmatter --- src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index bb07cab..39b7e02 100644 --- a/src/main.ts +++ b/src/main.ts @@ -295,8 +295,8 @@ export default class CloudAtlasPlugin extends Plugin { if (metadata?.frontmatter) { const frontmatter = metadata?.frontmatter; - const links = frontmatter["ca-url"]; - links.map((link: string) => { + const links = frontmatter["ca-url"];//handle ca-url being undefined + links && links.map((link: string) => { additionalContext[link] = link; });