From ad3ee14d2b052ee09d0c8c4a92048ca74bce025d Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 23 Apr 2019 13:35:05 +0200 Subject: [PATCH] Fix Clean CryptDrive button in settings --- www/common/cryptpad-common.js | 2 +- www/common/outer/async-store.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 42fe7a55a..9f1d3f544 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -77,7 +77,7 @@ define([ // Settings only common.resetDrive = function (cb) { postMessage("RESET_DRIVE", null, function (obj) { - if (obj.error) { return void cb(obj.error); } + if (obj && obj.error) { return void cb(obj.error); } cb(); }); }; diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index ddc332bfd..efa05d85d 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -635,7 +635,7 @@ define([ nThen(function (waitFor) { removeOwnedPads(waitFor); }).nThen(function () { - store.proxy.drive = store.fo.getStructure(); + store.proxy.drive = store.userObject.getStructure(); sendDriveEvent('DRIVE_CHANGE', { path: ['drive', 'filesData'] }, clientId);