From 0e89bca78ecc07b355399fe26abeea86c9abfa35 Mon Sep 17 00:00:00 2001 From: Chotiwat Chawannakul Date: Wed, 11 Sep 2013 14:14:13 +0700 Subject: [PATCH] Handle undefined quota list response when set quota on some imap server (e.g. cyrus) --- lib/Connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Connection.js b/lib/Connection.js index 7b85093..ea8984e 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -879,7 +879,7 @@ Connection.prototype.setQuota = function(quotaRoot, limits, cb) { if (err) return cb(err); - cb(err, quotalist[0]); + cb(err, quotalist ? quotalist[0] : limits); } ); };