Skip to content

Commit

Permalink
GH-45: Fix problematic JS from GH-151
Browse files Browse the repository at this point in the history
  • Loading branch information
CMDJojo committed Mar 12, 2023
1 parent 234ca3f commit 51ada7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions playground/static/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,10 @@ onmessage = (event) => {
case "transpile":
result = wasm_bindgen.transpile(event.data.source, event.data.format);
break;

case "package_info":
result = wasm_bindgen.package_info();
}
postMessage({ result: result, success: true, ...event.data });
} catch (error) {
console.log(error);
postMessage({ error: error, success: false, ...event.data })
}
};
};
2 changes: 1 addition & 1 deletion playground/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ compiler.onmessage = (event) => {
return;
}

if (event.data.seq != seq) return;
if (event.data.seq !== seq) return;
if (event.data.success) {
compiler_callback(event.data.result);
} else {
Expand Down

0 comments on commit 51ada7c

Please sign in to comment.