From 84591729a8d4b7f65488db8ae1eab4b94662e932 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 15 Nov 2017 11:15:49 +0000 Subject: [PATCH] unbreak tests --- src/settings/handlers/AccountSettingsHandler.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/settings/handlers/AccountSettingsHandler.js b/src/settings/handlers/AccountSettingsHandler.js index 452b332f00..47c5cecc32 100644 --- a/src/settings/handlers/AccountSettingsHandler.js +++ b/src/settings/handlers/AccountSettingsHandler.js @@ -64,7 +64,9 @@ export default class AccountSettingHandler extends SettingsHandler { } _getSettings(eventType = "im.vector.web.settings") { - const event = MatrixClientPeg.get().getAccountData(eventType); + const cli = MatrixClientPeg.get(); + if (!cli) return {}; + const event = cli.getAccountData(eventType); if (!event || !event.getContent()) return {}; return event.getContent(); }