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(