Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1856 from matrix-org/luke/fix-piwik-crash
Browse files Browse the repository at this point in the history
Null check piwik config before using it
  • Loading branch information
lukebarnard1 authored Apr 26, 2018
2 parents 452bf0b + d734a9b commit fba1a0c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fba1a0c

Please sign in to comment.