good morning!!!!

Skip to content
Snippets Groups Projects
Commit 077353b4 authored by Casey Detrio's avatar Casey Detrio Committed by Felix Lange
Browse files

console: fix return via callbacks (#2910)

Fixes #2872
parent d6625ac3
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment