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() }