From 2964cfe14a6374b27dbc96ee51c923114edc376f Mon Sep 17 00:00:00 2001 From: mscdex Date: Tue, 15 Jan 2013 14:58:03 -0500 Subject: [PATCH] fix emitting of 'message' event for fetch responses with no body literals --- lib/imap.js | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/lib/imap.js b/lib/imap.js index cfca36a..ab8d25c 100644 --- a/lib/imap.js +++ b/lib/imap.js @@ -326,12 +326,13 @@ ImapConnection.prototype.connect = function(loginCb) { bodies = ['', null]; } + var shouldEmit; for (body = 0, lenb = bodies.length; body < lenb; body += 2) { fetches = requests[0].fetchers[bodies[body]]; val = bodies[body + 1]; for (var i=0, len=fetches.length; i