Skip to content

Commit

Permalink
Revert shaving 4 bytes (#10)
Browse files Browse the repository at this point in the history
Revert shaving 4 bytes
  • Loading branch information
surma committed Nov 15, 2019
2 parents a38ca2c + c0e017b commit e27ac44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/detectors/big-int/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@

export default async function(bytes) {
try {
const n = 0n;
// This will throw a ReferenceError on platforms where BigInt is not
// supported. Please do not change the right hand side value to BigInt
// literal (i.e. 0n), cause in that case a SyntaxError will be thrown
// before an execution.
const n = BigInt(0);
const instance = await WebAssembly.instantiate(bytes);
return instance.instance.exports.b(n) === n;
} catch {
Expand Down

0 comments on commit e27ac44

Please sign in to comment.