From 6e84c7b5e9a79cbcfab2a6928b7d400eb9ac0eaa Mon Sep 17 00:00:00 2001 From: Guillaume Ballet Date: Wed, 11 Dec 2019 16:41:04 +0100 Subject: [PATCH] Fix isBigNumber --- internal/jsre/pretty.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/jsre/pretty.go b/internal/jsre/pretty.go index 857172a048..af648520e4 100644 --- a/internal/jsre/pretty.go +++ b/internal/jsre/pretty.go @@ -263,11 +263,11 @@ func (ctx ppctx) isBigNumber(v *goja.Object) bool { return false } prototype := BigNumber.Get("prototype").ToObject(ctx.vm) - isPrototypeOf, exists := goja.AssertFunction(prototype.Get("isPrototypeOf")) - if !exists { + isPrototypeOf, callable := goja.AssertFunction(prototype.Get("isPrototypeOf")) + if !callable { return false } - bv, _ := isPrototypeOf(v) + bv, _ := isPrototypeOf(prototype, v) return bv.ToBoolean() }