Applied changes to solve several issues about typescript strict mode

This commit is contained in:
Alexander Cerutti
2021-12-23 19:46:29 +01:00
parent ef20bc5a44
commit cf8a467266
6 changed files with 56 additions and 38 deletions

View File

@@ -49,7 +49,9 @@ export default async function getModelFolderContents(
.reduce((acc, current) => ({ ...acc, ...current }), {});
return modelRecords;
} catch (err) {
} catch (_err) {
const err = _err as NodeJS.ErrnoException;
if (err?.code === "ENOENT") {
if (err.syscall === "open") {
// file opening failed