Merge pull request #1856 from matrix-org/luke/fix-piwik-crash

Null check piwik config before using it
This commit is contained in:
Luke Barnard 2018-04-26 14:05:46 +01:00 committed by GitHub
commit fba1a0c4c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;