1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Null check piwik config before using it

to avoid crashing at login
This commit is contained in:
Luke Barnard
2018-04-26 13:41:43 +01:00
parent 452bf0bd09
commit d734a9ba6e

View File

@@ -197,6 +197,8 @@ class Analytics {
if (this.disabled) return;
const config = SdkConfig.get();
if (!config.piwik) return;
const whitelistedHSUrls = config.piwik.whitelistedHSUrls || DEFAULTS.piwik.whitelistedHSUrls;
const whitelistedISUrls = config.piwik.whitelistedISUrls || DEFAULTS.piwik.whitelistedISUrls;