FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

esm: fix wasm import name in error message · nodejs/node@f48927f · GitHub

/ node Public

Commit f48927f

Browse files
authored andcommitted
esm: fix wasm import name in error message
Report the rejected import name instead of the import module when throwing for reserved Wasm import names. Signed-off-by: hyemimi <hyemi7375@gmail.com> PR-URL: #64950 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com>
1 parent 9a256b0 commit f48927f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/internal/modules/esm/translators.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ translators.set('wasm', function(url, translateContext) {
581581
throw new WebAssembly.LinkError(`Invalid Wasm import "${impt.module}" in ${url}`);
582582
}
583583
if (impt.name.startsWith('wasm:') || impt.name.startsWith('wasm-js:')) {
584-
throw new WebAssembly.LinkError(`Invalid Wasm import name "${impt.module}" in ${url}`);
584+
throw new WebAssembly.LinkError(`Invalid Wasm import name "${impt.name}" in ${url}`);
585585
}
586586
importsList.add(impt.module);
587587
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL