Skip to content

Commit

Permalink
Add catch binding
Browse files Browse the repository at this point in the history
  • Loading branch information
chicoxyzzy committed Nov 23, 2019
1 parent e27ac44 commit 5f96ca6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/detectors/big-int/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default async function(bytes) {
const n = BigInt(0);
const instance = await WebAssembly.instantiate(bytes);
return instance.instance.exports.b(n) === n;
} catch {
} catch (e) {
return false;
}
}
2 changes: 1 addition & 1 deletion src/detectors/threads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default async function(module, validate) {
// https://groups.google.com/forum/#!msg/mozilla.dev.platform/IHkBZlHETpA/dwsMNchWEQAJ
new MessageChannel().port1.postMessage(new SharedArrayBuffer(1));
return true;
} catch {
} catch (e) {
return false;
}
}

0 comments on commit 5f96ca6

Please sign in to comment.