avoid extra call to store if there are no keys to remove
This commit is contained in:
1 parent
9a5294016d
commit
dcc9810a42
1 file changed
+1
@@ -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