mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Fix isBigNumber
This commit is contained in:
parent
fe2b2e0033
commit
6e84c7b5e9
1 changed files with 3 additions and 3 deletions
|
|
@ -263,11 +263,11 @@ func (ctx ppctx) isBigNumber(v *goja.Object) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
prototype := BigNumber.Get("prototype").ToObject(ctx.vm)
|
prototype := BigNumber.Get("prototype").ToObject(ctx.vm)
|
||||||
isPrototypeOf, exists := goja.AssertFunction(prototype.Get("isPrototypeOf"))
|
isPrototypeOf, callable := goja.AssertFunction(prototype.Get("isPrototypeOf"))
|
||||||
if !exists {
|
if !callable {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
bv, _ := isPrototypeOf(v)
|
bv, _ := isPrototypeOf(prototype, v)
|
||||||
return bv.ToBoolean()
|
return bv.ToBoolean()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue