mirror of
https://github.com/gorhill/uBlock.git
synced 2025-02-01 04:31:36 +01:00
Remove stray async
This commit is contained in:
parent
98fc66bb1b
commit
076a088371
@ -81,14 +81,16 @@ function applyList(name, raw) {
|
||||
}
|
||||
|
||||
async function enableWASM() {
|
||||
const wasmModuleFetcher = async function(path) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const wasmModuleFetcher = function(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const require = createRequire(import.meta.url); // jshint ignore:line
|
||||
const fs = require('fs');
|
||||
fs.readFile(`${path}.wasm`, null, (err, data) => {
|
||||
if ( err ) { return reject(err); }
|
||||
return globals.WebAssembly.compile(data).then(module => {
|
||||
resolve(module);
|
||||
}).catch(reason => {
|
||||
reject(reason);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -344,7 +344,7 @@ try {
|
||||
}
|
||||
|
||||
if ( µb.hiddenSettings.disableWebAssembly !== true ) {
|
||||
const wasmModuleFetcher = async function(path) {
|
||||
const wasmModuleFetcher = function(path) {
|
||||
return fetch(`${path}.wasm`, { mode: 'same-origin' }).then(
|
||||
globals.WebAssembly.compileStreaming
|
||||
).catch(reason => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user