unbreak tests

This commit is contained in:
Matthew Hodgson 2017-11-15 11:15:49 +00:00
parent a63c491220
commit 84591729a8

View file

@ -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();
}