From 380e3d39045c48bcafb8e3ba15505b3aa2f7f605 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sun, 15 Jan 2023 11:14:21 +0100 Subject: [PATCH] Possibly fixes #307 --- plug-api/lib/frontmatter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plug-api/lib/frontmatter.ts b/plug-api/lib/frontmatter.ts index 75d72395..8f8ddbf1 100644 --- a/plug-api/lib/frontmatter.ts +++ b/plug-api/lib/frontmatter.ts @@ -27,7 +27,7 @@ export function extractFrontmatter( if (!data.tags) { data.tags = []; } - if (!data.tags.includes(tagname)) { + if (Array.isArray(data.tags) && !data.tags.includes(tagname)) { data.tags.push(tagname); } }