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;