-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(bigint): Use typeof for testing if BigInt exists
The `if (BigInt) { … }` style does not work in browser environments that do not implement BigInt (e.g. Safari <= 13). A `hasBigInt` flag was added and exported from `util` and uses the format of `typeof BigInt !== ‘undefined’` which should work in all environments. All usage of `BigInt` is now guarded by an equivalent of `if (hasBigInt) {…}` to ensure it’s available before use.
- Loading branch information
Showing
3 changed files
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters