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

Null check piwik config before using it
pull/21833/head
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
1 changed files with 2 additions and 0 deletions

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;