diff --git a/workspaces/cms-scripts/src/index.ts b/workspaces/cms-scripts/src/index.ts index 6f07c48d3a7..d46ce702138 100644 --- a/workspaces/cms-scripts/src/index.ts +++ b/workspaces/cms-scripts/src/index.ts @@ -224,11 +224,13 @@ for (const data of roadmapPosts.filenameMap.values()) { ); } -for (const data of announcements.filenameMap.values()) { - await write( - `public/data/announcements/${data.locale}/${data.slug}.json`, - data -); +if (!!announcements) { + for (const data of announcements.filenameMap.values()) { + await write( + `public/data/announcements/${data.locale}/${data.slug}.json`, + data + ); + } } for (const locale of locales) {