diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-07-07 17:55:23 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-07-07 17:55:23 +0800 |
commit | 916d1554675974adb92af4046e1b04ad3b26dca3 (patch) | |
tree | 6ab24e55a8b4bd14b3a9c25917d440c03b875bfc /jsre/pp_js.go | |
parent | d764bd058457cd9eb91d205d1ac187d40c4866d6 (diff) | |
parent | c5cb6e8e70339b6641b7ce46cda04b83936213b3 (diff) | |
download | dexon-916d1554675974adb92af4046e1b04ad3b26dca3.tar dexon-916d1554675974adb92af4046e1b04ad3b26dca3.tar.gz dexon-916d1554675974adb92af4046e1b04ad3b26dca3.tar.bz2 dexon-916d1554675974adb92af4046e1b04ad3b26dca3.tar.lz dexon-916d1554675974adb92af4046e1b04ad3b26dca3.tar.xz dexon-916d1554675974adb92af4046e1b04ad3b26dca3.tar.zst dexon-916d1554675974adb92af4046e1b04ad3b26dca3.zip |
Merge pull request #1429 from obscuren/rebase-registrar
Rebase registrar
Diffstat (limited to 'jsre/pp_js.go')
-rw-r--r-- | jsre/pp_js.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/jsre/pp_js.go b/jsre/pp_js.go index 20821e4a1..735132bb7 100644 --- a/jsre/pp_js.go +++ b/jsre/pp_js.go @@ -97,7 +97,15 @@ var isMemberFunction = function(object, member) { } var isBigNumber = function (object) { - return typeof BigNumber !== 'undefined' && object instanceof BigNumber; + var result = typeof BigNumber !== 'undefined' && object instanceof BigNumber; + + if (!result) { + if(typeof(object) === "object") { + result = object.constructor.toString().indexOf("function BigNumber(") == 0; + } + } + + return result }; function prettyPrint(/* */) { |