fix more any

This commit is contained in:
Olivier Gagnon
2022-07-20 01:13:06 -04:00
parent 71d8e35bb5
commit ceb9fa1249
5 changed files with 35 additions and 104 deletions
+6
View File
@@ -84,6 +84,12 @@ export async function executeJSScript(
`${script.filename} cannot be run because it does not have a main function.`,
);
}
if (!ns) {
throw makeRuntimeRejectMsg(
workerScript,
`${script.filename} cannot be run because the NS object hasn't been constructed properly.`,
);
}
return loadedModule.main(ns);
}