aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jsre/pp_js.go10
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(/* */) {