mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
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:
@@ -275,7 +275,9 @@ function readFileIfExists(pathToFile) {
|
|||||||
try {
|
try {
|
||||||
return fs.readFileSync(pathToFile, 'utf8');
|
return fs.readFileSync(pathToFile, 'utf8');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Error:', e.stack);
|
if (e instanceof Error) {
|
||||||
|
console.error('Error:', e.stack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
Reference in New Issue
Block a user