mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
extract err
This commit is contained in:
parent
22c9a5e011
commit
b41d01b4ad
@ -51,6 +51,7 @@ var api = function(dbot) {
|
|||||||
if(callbackIndex != -1) {
|
if(callbackIndex != -1) {
|
||||||
args[callbackIndex] = function() {
|
args[callbackIndex] = function() {
|
||||||
body.data = Array.prototype.slice.call(arguments, 0);
|
body.data = Array.prototype.slice.call(arguments, 0);
|
||||||
|
console.log(body);
|
||||||
if(_.isObject(body.data) && _.has(body.data, 'err')) {
|
if(_.isObject(body.data) && _.has(body.data, 'err')) {
|
||||||
body.err = body.data.err;
|
body.err = body.data.err;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user