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); return cb(err);
var quotas = {}; var quotas = {};
for (var i = 0, len = quotalist.length; i < len; ++i) if (quotalist) {
quotas[quotalist[i].root] = quotalist[i].resources; for (var i = 0, len = quotalist.length; i < len; ++i)
quotas[quotalist[i].root] = quotalist[i].resources;
}
cb(err, quotas); cb(err, quotas);
}); });

Loading…
Cancel
Save