From eb25b01fa49f12767b83013fe8f0a400c36bc870 Mon Sep 17 00:00:00 2001 From: Igal Steklov Date: Wed, 14 Feb 2024 09:33:53 +0200 Subject: [PATCH] Workaround an issue of sitemap build when there are no categoriesx --- workspaces/cms-scripts/src/sitemap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspaces/cms-scripts/src/sitemap.ts b/workspaces/cms-scripts/src/sitemap.ts index b15be1b21e..cff018207c 100644 --- a/workspaces/cms-scripts/src/sitemap.ts +++ b/workspaces/cms-scripts/src/sitemap.ts @@ -125,7 +125,7 @@ const parsePosts = async () => { const { filenameMap } = await getPosts(); const categories: string[] = []; - filenameMap.forEach(({ locale, category: fileCategories, slug, published_date, post_type, video }) => { + filenameMap.forEach(({ locale, category: fileCategories = [], slug, published_date, post_type, video }) => { for (const category of fileCategories) { if (!categories.includes(category)) { categories.push(category);