From bf983e7f519c4e1212b60dd11ef41afc6eecd135 Mon Sep 17 00:00:00 2001 From: PedroBailaAndrade Date: Mon, 8 Jan 2024 15:55:19 +0000 Subject: [PATCH] test 2 --- workspaces/cms-scripts/src/index.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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) {