Error in _resContinue: cannot read "2" of undefined #357

Closed
Zugwalt opened this Issue Mar 7, 2014 · 1 comment

Projects

None yet

2 participants

Zugwalt commented Mar 7, 2014

Hit this error while reading mail from gmail account. I was able to get around it by first checking that m was non-null:

Parser.prototype._resContinue = function() {
  var m = RE_CONTINUE.exec(this._buffer),
      textCode,
      text = m && m[2];
  this._buffer = '';

  if (m && m[1] !== undefined)
    textCode = parseTextCode(m && m[1], this._literals);

  this.emit('continue', {
    textCode: textCode,
    text: text
  });
};
Owner
mscdex commented May 1, 2014

This was already fixed in 94bd045.

@mscdex mscdex closed this May 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment