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

pull/1/head
ansuz 2016-08-03 09:42:49 +02:00
parent 9a5294016d
commit dcc9810a42
1 changed files with 1 additions and 0 deletions

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);
});