From fc03782985e5b3310ab9418c23c366f9bb0e3af5 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 1 Feb 2019 09:09:51 -0500 Subject: [PATCH] Ensure that WASM module was actually loaded --- src/js/hntrie.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/hntrie.js b/src/js/hntrie.js index 6da0a2040..2ad411618 100644 --- a/src/js/hntrie.js +++ b/src/js/hntrie.js @@ -497,6 +497,9 @@ HNTrieContainer.prototype = { }, initWASM: function(module) { + if ( module instanceof WebAssembly.Module === false ) { + return Promise.resolve(null); + } if ( this.wasmInstancePromise === null ) { const memory = new WebAssembly.Memory({ initial: 2 }); this.wasmInstancePromise = WebAssembly.instantiate(