Skip to content

Commit

Permalink
feat(js): add check to no_modules gen js for cloudflare workers
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleygwilliams committed Mar 21, 2019
1 parent 0e864a4 commit 4b4812f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/cli-support/src/js/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ impl<'a> Context<'a> {
function init(module_or_path, maybe_memory) {{
let result;
const imports = {{ './{module}': __exports }};
if (module_or_path instanceof WebAssembly.Module) {{
if (module_or_path instanceof WebAssembly.Module || module_or_path.toString() === '[object WebAssembly.Module]') {{
{init_memory1}
result = WebAssembly.instantiate(module_or_path, imports)
.then(instance => {{
Expand Down

0 comments on commit 4b4812f

Please sign in to comment.