From a094e3c02eb4f5e5717741cb4687eeb113a46e4e Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 3 Aug 2016 11:02:34 +0200 Subject: [PATCH] use correct store api calls in frame.js also don't log unnecessarily --- customize.dist/main.js | 1 - customize.dist/share/frame.js | 6 +++--- www/common/cryptpad-common.js | 6 ++++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/customize.dist/main.js b/customize.dist/main.js index ad3432fb6..2de4cacd2 100644 --- a/customize.dist/main.js +++ b/customize.dist/main.js @@ -115,7 +115,6 @@ define([ Cryptpad.ready(function () { console.log("ready"); Cryptpad.getRecentPads(function (err, recentPads) { - console.log(recentPads); if (err) { console.log("unable to get recent pads"); console.error(err); diff --git a/customize.dist/share/frame.js b/customize.dist/share/frame.js index e512d254b..0e32593c8 100644 --- a/customize.dist/share/frame.js +++ b/customize.dist/share/frame.js @@ -108,7 +108,7 @@ send('set', key, val, cb); }; - var batchset = frame.batchset = function (map, cb) { + var batchset = frame.setBatch = function (map, cb) { send('batchset', void 0, map, cb); }; @@ -116,7 +116,7 @@ send('get', key, void 0, cb); }; - var batchget = frame.batchget = function (keys, cb) { + var batchget = frame.getBatch = function (keys, cb) { send('batchget', void 0, keys, cb); }; @@ -124,7 +124,7 @@ send('remove', key, void 0, cb); }; - var batchremove = frame.batchremove = function (keys, cb) { + var batchremove = frame.removeBatch = function (keys, cb) { send('batchremove', void 0, keys, cb); }; diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 6417a98a4..69edfa5d6 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -159,7 +159,6 @@ define([ } getRecentPads(function (err, recentPads) { - console.log(recentPads); setRecentPads(recentPads.filter(function (pad) { if (pad.href !== href) { return true; @@ -179,7 +178,10 @@ define([ return k.indexOf(hash) === 0; }); - if (!toRemove.length) { return; } + if (!toRemove.length) { + cb(); + return; + } Store.removebatch(toRemove, function (err, data) { cb(err, data); });