From dd3575560dbdf8ed81c58f2aa2411c645b43b132 Mon Sep 17 00:00:00 2001 From: mscdex Date: Sat, 29 Jun 2013 16:32:48 -0400 Subject: [PATCH] Connection: fix typos --- lib/Connection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Connection.js b/lib/Connection.js index 4581f71..4a89da8 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -81,7 +81,7 @@ Connection.prototype.connect = function() { socket = new Socket(); socket.setKeepAlive(true); socket.setTimeout(0); - this._state = 'disconnected'; + this.state = 'disconnected'; if (config.secure) { tlsOptions = {}; @@ -445,7 +445,7 @@ Connection.prototype._store = function(which, uids, flags, isAdding, cb) { if (!isKeywords) { if (flags[i][0] === '\\') flags[i] = flags[i].substr(1); - if (this._state.box.permFlags.indexOf(flags[i].toLowerCase()) === -1 + if (this._box.permFlags.indexOf(flags[i].toLowerCase()) === -1 || flags[i] === '*') throw new Error('The flag "' + flags[i] + '" is not allowed by the server for this mailbox');