Fix errors when an anonymous user leaves the shared worker

pull/1/head
yflory 5 years ago
parent d3939e87b2
commit d0bce11c21

@ -2089,9 +2089,12 @@ define([
store.onlyoffice.removeClient(clientId); store.onlyoffice.removeClient(clientId);
} catch (e) { console.error(e); } } catch (e) { console.error(e); }
try { try {
if (store.mailbox) {
store.mailbox.removeClient(clientId); store.mailbox.removeClient(clientId);
}
} catch (e) { console.error(e); } } catch (e) { console.error(e); }
Object.keys(store.modules).forEach(function (key) { Object.keys(store.modules).forEach(function (key) {
if (!store.modules[key]) { return; }
if (!store.modules[key].removeClient) { return; } if (!store.modules[key].removeClient) { return; }
try { try {
store.modules[key].removeClient(clientId); store.modules[key].removeClient(clientId);

Loading…
Cancel
Save