From 51ada7c99e050153af82ffcebcdeee801c5762b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Wid=C3=A9n?= Date: Sun, 12 Mar 2023 20:57:34 +0100 Subject: [PATCH] GH-45: Fix problematic JS from GH-151 --- playground/static/compiler.js | 5 +---- playground/static/main.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/playground/static/compiler.js b/playground/static/compiler.js index 767a5264..bb642f20 100644 --- a/playground/static/compiler.js +++ b/playground/static/compiler.js @@ -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 }) } -}; \ No newline at end of file +}; diff --git a/playground/static/main.js b/playground/static/main.js index 22545d92..447029ed 100644 --- a/playground/static/main.js +++ b/playground/static/main.js @@ -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 {