mirror of
https://github.com/status-im/web3.js.git
synced 2025-02-23 03:28:07 +00:00
isFinite behaves differently in go js env
This commit is contained in:
parent
e058ee89bc
commit
bbd6df0a83
@ -230,10 +230,10 @@ var toHex = function (val) {
|
||||
if (isString(val)) {
|
||||
if (val.indexOf('-0x') === 0)
|
||||
return fromDecimal(val);
|
||||
else if (!isFinite(val))
|
||||
return fromAscii(val);
|
||||
else if(val.indexOf('0x') === 0)
|
||||
return val;
|
||||
else if (!isFinite(val))
|
||||
return fromAscii(val);
|
||||
}
|
||||
|
||||
return fromDecimal(val);
|
||||
|
Loading…
x
Reference in New Issue
Block a user