From bbcaaad272f09c8aad59339073d82bf633ea933d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mickael=20Faivre-Ma=C3=A7on?= Date: Mon, 20 Sep 2021 22:21:43 +0200 Subject: [PATCH] fix Cannot read property 'length' of undefined --- src/imap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imap.js b/src/imap.js index d26f92e..1268b91 100644 --- a/src/imap.js +++ b/src/imap.js @@ -550,7 +550,7 @@ export default class Imap { */ // if (command[0] === ASCII_PLUS) { - if (this._currentCommand.data.length) { + if (this._currentCommand.data?.length) { // feed the next chunk of data var chunk = this._currentCommand.data.shift() chunk += (!this._currentCommand.data.length ? EOL : '') // EOL if there's nothing more to send