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 #1857 from matrix-org/luke/fix-piwik-crash2
Browse files Browse the repository at this point in the history
Fix Analytics to not import DEFAULTS, therefore avoiding NPE
  • Loading branch information
lukebarnard1 authored Apr 26, 2018
2 parents fba1a0c + b1af4ec commit a17c6e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import { getCurrentLanguage, _t, _td } from './languageHandler';
import PlatformPeg from './PlatformPeg';
import SdkConfig, { DEFAULTS } from './SdkConfig';
import SdkConfig from './SdkConfig';
import Modal from './Modal';
import sdk from './index';

Expand Down Expand Up @@ -199,8 +199,8 @@ class Analytics {
const config = SdkConfig.get();
if (!config.piwik) return;

const whitelistedHSUrls = config.piwik.whitelistedHSUrls || DEFAULTS.piwik.whitelistedHSUrls;
const whitelistedISUrls = config.piwik.whitelistedISUrls || DEFAULTS.piwik.whitelistedISUrls;
const whitelistedHSUrls = config.piwik.whitelistedHSUrls;
const whitelistedISUrls = config.piwik.whitelistedISUrls;

this._setVisitVariable('User Type', isGuest ? 'Guest' : 'Logged In');
this._setVisitVariable('Homeserver URL', whitelistRedact(whitelistedHSUrls, homeserverUrl));
Expand Down
1 change: 0 additions & 1 deletion src/SdkConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ class SdkConfig {
}

module.exports = SdkConfig;
module.exports.DEFAULTS = DEFAULTS;

0 comments on commit a17c6e1

Please sign in to comment.