Skip to content

Commit

Permalink
Fix: tsc did not build (#4471)
Browse files Browse the repository at this point in the history
cli/run/loadConfigFile.ts:114:4 - error TS2722: Cannot invoke an object which is possibly 'undefined'.

114    defaultLoader(module, requiredFileName);
       ~~~~~~~~~~~~~
  • Loading branch information
frank-dspeed committed Apr 23, 2022
1 parent 030c56f commit 4b6627f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/run/loadConfigFile.ts
Expand Up @@ -111,7 +111,9 @@ async function loadConfigFromBundledFile(fileName: string, bundledCode: string):
if (requiredFileName === resolvedFileName) {
(module as NodeModuleWithCompile)._compile(bundledCode, requiredFileName);
} else {
defaultLoader(module, requiredFileName);
if (defaultLoader) {
defaultLoader(module, requiredFileName);
}
}
};
delete require.cache[resolvedFileName];
Expand Down

0 comments on commit 4b6627f

Please sign in to comment.