Skip to content

Commit

Permalink
Merge pull request #14 from chicoxyzzy/catch_binding
Browse files Browse the repository at this point in the history
Add catch binding
  • Loading branch information
surma committed Nov 24, 2019
2 parents e27ac44 + 5f96ca6 commit b279da9
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 b279da9

Please sign in to comment.