From 104da73ab4fa6a3c58bb836a4882958ab54a8faf Mon Sep 17 00:00:00 2001 From: Ebmtranceboy Date: Thu, 21 Sep 2023 13:08:09 +0200 Subject: [PATCH] Update BigInt.js Replace the === operator with the advised isNaN function --- src/JS/BigInt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JS/BigInt.js b/src/JS/BigInt.js index 2236e23..9b72abc 100644 --- a/src/JS/BigInt.js +++ b/src/JS/BigInt.js @@ -36,7 +36,7 @@ export const fromStringAsImpl = function (just) { function f(acc, chunk) { let n = BigInt(parseInt(chunk, radix)); - if (n === NaN) { + if (isNaN(n)) { throw new Error("Invalid number"); } else { return acc * factor + n;