Skip to content

Commit 0ba1b26

Browse files
Fixed sync-i18n script not working anymore
This is caused by the typescript 4.4 update that changed the catch type from any to unknown
1 parent c13d23d commit 0ba1b26

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/sync-i18n-files.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,9 @@ function readFileIfExists(pathToFile) {
275275
try {
276276
return fs.readFileSync(pathToFile, 'utf8');
277277
} catch (e) {
278-
console.error('Error:', e.stack);
278+
if (e instanceof Error) {
279+
console.error('Error:', e.stack);
280+
}
279281
}
280282
}
281283
return null;

0 commit comments

Comments
 (0)