From d0bce11c21679bdc6ba62f432a39476ef0f92fc1 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 21 Feb 2020 12:07:53 +0100 Subject: [PATCH] Fix errors when an anonymous user leaves the shared worker --- www/common/outer/async-store.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index ad7a40f33..dd42bcc3b 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -2089,9 +2089,12 @@ define([ store.onlyoffice.removeClient(clientId); } catch (e) { console.error(e); } try { - store.mailbox.removeClient(clientId); + if (store.mailbox) { + store.mailbox.removeClient(clientId); + } } catch (e) { console.error(e); } Object.keys(store.modules).forEach(function (key) { + if (!store.modules[key]) { return; } if (!store.modules[key].removeClient) { return; } try { store.modules[key].removeClient(clientId);