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 13 years ago committed by Brian White
parent e739623172
commit bfcacac2c0

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

Loading…
Cancel
Save