From 077353b47ecd62f8fbd10f2d7d9fed25a1a05ac0 Mon Sep 17 00:00:00 2001 From: cdetrio Date: Mon, 15 Aug 2016 17:52:47 -0400 Subject: [PATCH] console: fix return via callbacks (#2910) Fixes #2872 --- console/bridge.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/console/bridge.go b/console/bridge.go index 06cb41d808..22ed7192bb 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