Skip to content

Commit 3892895

Browse files
committed
fix for #242
1 parent ec81062 commit 3892895

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

BigInteger.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ var bigInt = (function (undefined) {
13191319

13201320
BigInteger.prototype.toString = function (radix, alphabet) {
13211321
if (radix === undefined) radix = 10;
1322-
if (radix !== 10) return toBaseString(this, radix, alphabet);
1322+
if (radix !== 10 || alphabet) return toBaseString(this, radix, alphabet);
13231323
var v = this.value, l = v.length, str = String(v[--l]), zeros = "0000000", digit;
13241324
while (--l >= 0) {
13251325
digit = String(v[l]);
@@ -1331,7 +1331,7 @@ var bigInt = (function (undefined) {
13311331

13321332
SmallInteger.prototype.toString = function (radix, alphabet) {
13331333
if (radix === undefined) radix = 10;
1334-
if (radix != 10) return toBaseString(this, radix, alphabet);
1334+
if (radix != 10 || alphabet) return toBaseString(this, radix, alphabet);
13351335
return String(this.value);
13361336
};
13371337

0 commit comments

Comments
 (0)