1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 12:57:57 +02:00

Remove stray async

This commit is contained in:
Raymond Hill 2021-07-29 17:04:32 -04:00
parent 98fc66bb1b
commit 076a088371
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 5 additions and 3 deletions

View File

@ -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);
});
});
});

View File

@ -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 => {