Skip to content

Commit

Permalink
fix(ember): Fix merging env config (#4714)
Browse files Browse the repository at this point in the history
Previously getting config from macros looks to be potentially pulling a fresh object instance in prod mode, which means the previous assign into the object no longer applies, and if the config didn't have a Sentry entry the initialize would crash. This should hopefully fix this issue for those no longer using config.
  • Loading branch information
k-fish authored Mar 15, 2022
1 parent 57a8997 commit cc44957
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ function getSentryConfig() {
const _global = getGlobalObject<GlobalConfig>();
_global.__sentryEmberConfig = _global.__sentryEmberConfig ?? {};
const environmentConfig = getOwnConfig<OwnConfig>().sentryConfig;
if (!environmentConfig.sentry) {
environmentConfig.sentry = {
browserTracingOptions: {},
};
}
Object.assign(environmentConfig.sentry, _global.__sentryEmberConfig);
return environmentConfig;
}
Expand Down

0 comments on commit cc44957

Please sign in to comment.