diff --git a/workspaces/cms-scripts/src/index.ts b/workspaces/cms-scripts/src/index.ts index 6f07c48d3a7..197eea3c896 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.filenameMap.size > 0) { + for (const data of announcements.filenameMap.values()) { + await write( + `public/data/announcements/${data.locale}/${data.slug}.json`, + data + ); + } } for (const locale of locales) {