Skip to content

Commit bfcacac

Browse files
Vytautas Jakutismscdex
authored andcommitted
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.
1 parent e739623 commit bfcacac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

imap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ ImapConnection.prototype.openBox = function(name, readOnly, cb) {
404404
this._resetBox();
405405
if (typeof cb === 'undefined') {
406406
if(typeof readOnly === 'undefined') {
407-
cb = function(){};
407+
cb = emptyFn;
408408
} else {
409409
cb = readOnly;
410410
}
@@ -1418,4 +1418,4 @@ function pipe(pair, socket) {
14181418
socket.on('close', onclose);
14191419

14201420
return cleartext;
1421-
}
1421+
}

0 commit comments

Comments
 (0)