We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0927eb9 commit 691d15bCopy full SHA for 691d15b
support/polyfills/JSBI.js
@@ -15,7 +15,8 @@ const JSBI = Sk.global.JSBI = Sk.global.BigInt !== undefined ? {} : __JSBI;
15
16
if (Sk.global.BigInt === undefined) {
17
// __isBigInt is not part of the public api so include it if this is ever removed
18
- JSBI.__isBigInt = JSBI.__isBigInt || ((x) => x instanceof JSBI);
+ const __isBigInt = JSBI.__isBigInt; // fixes a bug with null values passed to __isBigInt
19
+ JSBI.__isBigInt = __isBigInt ? (x) => x !== null && __isBigInt(x) : (x) => x instanceof JSBI;
20
JSBI.powermod = (x, y, z) => {
21
const One = JSBI.BigInt(1);
22
let number = One;
0 commit comments