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