Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Syntax changes for conditional statements that do variable assignment…

…s within the condition.
  • Loading branch information...
commit 3f20d31a936640ebab58afbe1cb6a8f729834ae1 1 parent 50e7274
Bruno Morency authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 imap.js
View
10 imap.js
@@ -185,7 +185,7 @@ ImapConnection.prototype.connect = function(loginCb) {
else
self._state.curData = data;
- if (restDesc = self._state.curData.toString().match(/^(.*?)\)\r\n/)) {
+ if ((restDesc = self._state.curData.toString().match(/^(.*?)\)\r\n/))) {
if (restDesc[1]) {
restDesc[1] = restDesc[1].trim();
if (restDesc[1].length)
@@ -288,15 +288,15 @@ ImapConnection.prototype.connect = function(loginCb) {
}
break;
case 'OK':
- if (result = /^\[ALERT\] (.*)$/i.exec(data[2]))
+ if ((result = /^\[ALERT\] (.*)$/i.exec(data[2])))
self.emit('alert', result[1]);
else if (self._state.status === STATES.BOXSELECTING) {
var result;
- if (result = /^\[UIDVALIDITY (\d+)\]/i.exec(data[2]))
+ if ((result = /^\[UIDVALIDITY (\d+)\]/i.exec(data[2])))
self._state.box.validity = result[1];
- else if (result = /^\[UIDNEXT (\d+)\]/i.exec(data[2]))
+ else if ((result = /^\[UIDNEXT (\d+)\]/i.exec(data[2])))
self._state.box._uidnext = result[1];
- else if (result = /^\[PERMANENTFLAGS \((.*)\)\]/i.exec(data[2])) {
+ else if ((result = /^\[PERMANENTFLAGS \((.*)\)\]/i.exec(data[2]))) {
self._state.box.permFlags = result[1].split(' ');
var idx;
if ((idx = self._state.box.permFlags.indexOf('\\*')) > -1) {
Please sign in to comment.
Something went wrong with that request. Please try again.