Skip to content

Commit 016b590

Browse files
authored
fix: Improve error logging for ES6 module assertion (#113131)
1 parent a8d5fb8 commit 016b590

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mono/browser/runtime/invoke-js.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ function mono_wasm_lookup_js_import (function_name: string, js_module_name: stri
385385
if (js_module_name) {
386386
scope = importedModules.get(js_module_name);
387387
if (WasmEnableThreads) {
388-
mono_assert(scope, () => `ES6 module ${js_module_name} was not imported yet, please call JSHost.ImportAsync() on the UI or JSWebWorker thread first.`);
388+
mono_assert(scope, () => `ES6 module ${js_module_name} was not imported yet, please call JSHost.ImportAsync() on the UI or JSWebWorker thread first in order to invoke ${function_name}.`);
389389
} else {
390-
mono_assert(scope, () => `ES6 module ${js_module_name} was not imported yet, please call JSHost.ImportAsync() first.`);
390+
mono_assert(scope, () => `ES6 module ${js_module_name} was not imported yet, please call JSHost.ImportAsync() first in order to invoke ${function_name}.`);
391391
}
392392
} else if (parts[0] === "INTERNAL") {
393393
scope = INTERNAL;

0 commit comments

Comments
 (0)