diff options
author | cdetrio <cdetrio@gmail.com> | 2016-08-16 05:52:47 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-08-16 05:52:47 +0800 |
commit | 077353b47ecd62f8fbd10f2d7d9fed25a1a05ac0 (patch) | |
tree | 2b8b7db55ddfd15be7c57f90e7c0bb38568ba032 /console | |
parent | d6625ac34dad741f5659ca1dad3b0179603d37f0 (diff) | |
download | dexon-077353b47ecd62f8fbd10f2d7d9fed25a1a05ac0.tar dexon-077353b47ecd62f8fbd10f2d7d9fed25a1a05ac0.tar.gz dexon-077353b47ecd62f8fbd10f2d7d9fed25a1a05ac0.tar.bz2 dexon-077353b47ecd62f8fbd10f2d7d9fed25a1a05ac0.tar.lz dexon-077353b47ecd62f8fbd10f2d7d9fed25a1a05ac0.tar.xz dexon-077353b47ecd62f8fbd10f2d7d9fed25a1a05ac0.tar.zst dexon-077353b47ecd62f8fbd10f2d7d9fed25a1a05ac0.zip |
console: fix return via callbacks (#2910)
Fixes #2872
Diffstat (limited to 'console')
-rw-r--r-- | console/bridge.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/console/bridge.go b/console/bridge.go index 06cb41d80..22ed7192b 100644 --- a/console/bridge.go +++ b/console/bridge.go @@ -255,8 +255,8 @@ func (b *bridge) Send(call otto.FunctionCall) (response otto.Value) { } else { response, _ = resps.Get("0") } - if fn := call.Argument(1).Object(); fn != nil && fn.Class() == "function" { - fn.Call("apply", response) + if fn := call.Argument(1); fn.Class() == "Function" { + fn.Call(otto.NullValue(), otto.NullValue(), response) return otto.UndefinedValue() } return response |