avoid extra call to store if there are no keys to remove
This commit is contained in:
@@ -179,6 +179,7 @@ define([
|
|||||||
return k.indexOf(hash) === 0;
|
return k.indexOf(hash) === 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!toRemove.length) { return; }
|
||||||
Store.removebatch(toRemove, function (err, data) {
|
Store.removebatch(toRemove, function (err, data) {
|
||||||
cb(err, data);
|
cb(err, data);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user