make close handler argument only one

pull/1894/head
Hiroyasu Nishiyama 2018-10-02 20:37:30 +09:00
parent 7cec7ae608
commit 58c8311d56
1 changed files with 1 additions and 2 deletions

View File

@ -189,8 +189,7 @@ module.exports = function(RED) {
}
}
this.on('close', function(arg1, arg2) {
var cb = arg2 ? arg2 : arg1;
this.on('close', function(cb) {
if (cb) {
node.closeCallbacks.push(done);
}