avoid extra call to store if there are no keys to remove

This commit is contained in:
ansuz
2016-08-03 09:42:49 +02:00
parent 9a5294016d
commit dcc9810a42

View File

@@ -179,6 +179,7 @@ define([
return k.indexOf(hash) === 0;
});
if (!toRemove.length) { return; }
Store.removebatch(toRemove, function (err, data) {
cb(err, data);
});