Skip to content

Commit

Permalink
Merge pull request #20 from Ebmtranceboy/main
Browse files Browse the repository at this point in the history
Update BigInt.js
  • Loading branch information
Ebmtranceboy committed Sep 21, 2023
2 parents 28129de + 104da73 commit 80d3466
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JS/BigInt.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 80d3466

Please sign in to comment.