fix circ ref on error and error passing
This commit is contained in:
parent
d92d164360
commit
1b5c723872
|
@ -79,7 +79,7 @@ function createApp(server, options) {
|
|||
return;
|
||||
}
|
||||
|
||||
cmd.args.push(function () {
|
||||
cmd.args.push(function (err) {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var myself;
|
||||
|
||||
|
@ -89,10 +89,11 @@ function createApp(server, options) {
|
|||
}
|
||||
|
||||
ws.send(JSON.stringify({
|
||||
this: this
|
||||
this: (!err && this !== global) ? this : {}
|
||||
, args: args
|
||||
, self: myself
|
||||
, id: cmd.id
|
||||
, error: err
|
||||
}));
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue