as noted by mscdex: openBox should use the emptyFn variable instead of creating a new empty function every time when readonly and cb are undefined.

fork
Vytautas Jakutis 14 years ago committed by Brian White
parent e739623172
commit bfcacac2c0

@ -404,7 +404,7 @@ ImapConnection.prototype.openBox = function(name, readOnly, cb) {
this._resetBox();
if (typeof cb === 'undefined') {
if(typeof readOnly === 'undefined') {
cb = function(){};
cb = emptyFn;
} else {
cb = readOnly;
}
@ -1418,4 +1418,4 @@ function pipe(pair, socket) {
socket.on('close', onclose);
return cleartext;
}
}

Loading…
Cancel
Save