From 3303e9738d2d38a266adf5a5c93d646a4eb27b40 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 12 Aug 2019 15:38:21 +0200 Subject: [PATCH 1/3] Fix drive deletion --- www/common/cryptpad-common.js | 2 +- www/common/outer/async-store.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index c19baf0a9..a22f4d57e 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -773,7 +773,7 @@ define([ waitFor.abort(); return void cb(obj); } - }), true); + })); common.unpinPads([oldChannel], waitFor()); common.pinPads([newSecret.channel], waitFor()); }).nThen(function (waitFor) { diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 0304a5006..9ef18ecb5 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -587,7 +587,10 @@ define([ })); }).nThen(function (waitFor) { // Delete Drive - Store.removeOwnedChannel(clientId, secret.channel, waitFor()); + Store.removeOwnedChannel(clientId, { + channel: secret.channel + force: true + }, waitFor()); }).nThen(function () { store.network.disconnect(); cb({ From 970dcb8b8b7d99048ba18ffbfc2ee21c0b6df662 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 12 Aug 2019 15:40:25 +0200 Subject: [PATCH 2/3] null is an object --- www/common/outer/async-store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 9ef18ecb5..a2e28f63b 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -244,7 +244,7 @@ define([ // data.force tells us we can safely remove the drive ID var channel = data; var force = false; - if (typeof(data) === "object") { + if (data && typeof(data) === "object") { channel = data.channel; force = data.force; } From 06748dcfb3bdeb45fae6c5c02222b5227d3a211c Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 13 Aug 2019 14:23:29 +0200 Subject: [PATCH 3/3] missing comma --- www/common/outer/async-store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index a2e28f63b..8564189fd 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -588,7 +588,7 @@ define([ }).nThen(function (waitFor) { // Delete Drive Store.removeOwnedChannel(clientId, { - channel: secret.channel + channel: secret.channel, force: true }, waitFor()); }).nThen(function () {