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
This commit is contained in:
Alexandre Vryghem
2024-04-14 21:28:26 +02:00
parent c13d23da9c
commit 0ba1b26318

View File

@@ -275,7 +275,9 @@ function readFileIfExists(pathToFile) {
try {
return fs.readFileSync(pathToFile, 'utf8');
} catch (e) {
console.error('Error:', e.stack);
if (e instanceof Error) {
console.error('Error:', e.stack);
}
}
}
return null;