Skip to content

Commit c1cbc87

Browse files
committed
fix: guard check for no match
1 parent 32efdd7 commit c1cbc87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/scripts/crowdin/translations/postLangPRs.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ import { processLocale } from "./utils"
88
const locales = i18n.map((lang) => lang.code)
99

1010
function postLangPRs() {
11-
const bucketsList = fs.readFileSync(BUCKETS_PATH, "utf-8")
11+
const bucketsListData = fs.readFileSync(BUCKETS_PATH, "utf-8")
12+
const bucketsList = JSON.parse(bucketsListData)
1213
if (!bucketsList) throw new Error("Failed to read buckets list.")
1314

1415
for (const locale of locales) {
16+
if (!bucketsList[locale]) return
1517
processLocale(locale, bucketsList[locale])
1618
}
1719
}

0 commit comments

Comments
 (0)