Skip to content

Commit

Permalink
fix: Fixes an error with configuration without analytics.
Browse files Browse the repository at this point in the history
Fixes an error `Cannot convert undefined or null to object` on load.
  • Loading branch information
damencho authored and pull[bot] committed Aug 17, 2021
1 parent 3cc588b commit 9525ce3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions react/features/base/conference/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ export function getConferenceOptions(stateful: Function | Object) {
options.applicationName = getName();
options.transcriptionLanguage = determineTranscriptionLanguage(options);

// Disable analytics, if requessted.
// Disable analytics, if requested.
if (options.disableThirdPartyRequests) {
delete config.analytics.scriptURLs;
delete config.analytics.amplitudeAPPKey;
delete config.analytics.googleAnalyticsTrackingId;
delete config.analytics?.scriptURLs;
delete config.analytics?.amplitudeAPPKey;
delete config.analytics?.googleAnalyticsTrackingId;
delete options.callStatsID;
delete options.callStatsSecret;
} else {
Expand Down
4 changes: 2 additions & 2 deletions react/features/base/config/functions.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export * from './functions.any';
export function _cleanupConfig(config: Object) {
config.analytics.scriptURLs = [];
if (NativeModules.AppInfo.LIBRE_BUILD) {
delete config.analytics.amplitudeAPPKey;
delete config.analytics.googleAnalyticsTrackingId;
delete config.analytics?.amplitudeAPPKey;
delete config.analytics?.googleAnalyticsTrackingId;
delete config.callStatsID;
delete config.callStatsSecret;
}
Expand Down

0 comments on commit 9525ce3

Please sign in to comment.