From dcc9810a424df3b377242c97dbc0d6d432795b71 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 3 Aug 2016 09:42:49 +0200 Subject: [PATCH] avoid extra call to store if there are no keys to remove --- www/common/cryptpad-common.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index ca5d699f6..6417a98a4 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -179,6 +179,7 @@ define([ return k.indexOf(hash) === 0; }); + if (!toRemove.length) { return; } Store.removebatch(toRemove, function (err, data) { cb(err, data); });