From d6339ada62899d9dbb8284c86cd1d365512b8100 Mon Sep 17 00:00:00 2001 From: Manish Jethani Date: Sun, 22 Aug 2021 01:32:32 +0530 Subject: [PATCH] Use WebAssembly object directly in index.js (#3843) --- platform/nodejs/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/nodejs/index.js b/platform/nodejs/index.js index 9488471e2..69292817d 100644 --- a/platform/nodejs/index.js +++ b/platform/nodejs/index.js @@ -19,6 +19,8 @@ Home: https://github.com/gorhill/uBlock */ +/* globals WebAssembly */ + 'use strict'; /******************************************************************************/ @@ -57,7 +59,7 @@ async function enableWASM() { const wasmModuleFetcher = function(path) { const require = createRequire(import.meta.url); // jshint ignore:line const wasm = new Uint8Array(require(`${path}.wasm.json`)); - return globals.WebAssembly.compile(wasm); + return WebAssembly.compile(wasm); }; try { const results = await Promise.all([