From b443192c1be9724f52a6d96e873cb8bbbfcd1f43 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sun, 28 Jan 2024 13:38:31 +0100 Subject: [PATCH] Fixes #656 --- plugs/index/page.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugs/index/page.ts b/plugs/index/page.ts index 91757311..80ca010f 100644 --- a/plugs/index/page.ts +++ b/plugs/index/page.ts @@ -41,6 +41,15 @@ export async function indexPage({ name, tree }: IndexTreeEvent) { combinedPageMeta.tag = "page"; + if (combinedPageMeta.aliases && !Array.isArray(combinedPageMeta.aliases)) { + console.warn( + "Aliases must be an array", + combinedPageMeta.aliases, + "falling back to empty array", + ); + combinedPageMeta.aliases = []; + } + updateITags(combinedPageMeta, frontmatter); // console.log("Page object", combinedPageMeta);