Connection: fix getQuotaRoot crashes when box has no quota root

fork
Chotiwat Chawannakul 11 years ago
parent a5a3ccfb4d
commit 06bd3b9037

@ -903,8 +903,10 @@ Connection.prototype.getQuotaRoot = function(boxName, cb) {
return cb(err);
var quotas = {};
for (var i = 0, len = quotalist.length; i < len; ++i)
quotas[quotalist[i].root] = quotalist[i].resources;
if (quotalist) {
for (var i = 0, len = quotalist.length; i < len; ++i)
quotas[quotalist[i].root] = quotalist[i].resources;
}
cb(err, quotas);
});

Loading…
Cancel
Save