From bfcacac2c04fbb816349f070069d4172f6e10797 Mon Sep 17 00:00:00 2001 From: Vytautas Jakutis Date: Tue, 22 Feb 2011 02:13:06 +0800 Subject: [PATCH] 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. --- imap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imap.js b/imap.js index f7fc743..65ec144 100644 --- a/imap.js +++ b/imap.js @@ -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; -} \ No newline at end of file +}