From 066a01ae94444f7c13f5709bcd74dbd445bd0e2c Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 17 Jan 2020 13:35:51 +0000 Subject: [PATCH] Check for a matrixclient before trying to use it Was being caught by the try block but still logging an error to the console unnecessarily: we should not expect there to necessarily be a matrix client since we run this from the constructor and there's a shared instance which could be constructed at any point. --- src/integrations/IntegrationManagers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/integrations/IntegrationManagers.js b/src/integrations/IntegrationManagers.js index b482ec73ce..c933e5c433 100644 --- a/src/integrations/IntegrationManagers.js +++ b/src/integrations/IntegrationManagers.js @@ -83,6 +83,7 @@ export class IntegrationManagers { } async _setupHomeserverManagers() { + if (!MatrixClientPeg.get()) return; try { console.log("Updating homeserver-configured integration managers..."); const homeserverDomain = MatrixClientPeg.getHomeserverName();