Skip to content

Commit c7d9d83

Browse files
authored
ref(ember): Fix merging of runtime config with environment config. (#3563)
Runtime config initially was meant to act as an override, but moving forward we want to be able to support it accepting the usual Sentry init config so that passing functions is possible.
1 parent 9226ba2 commit c7d9d83

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/ember/addon/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export function InitSentryForEmber(_runtimeConfig: BrowserOptions | undefined) {
1717
assert('Missing configuration.', config);
1818
assert('Missing configuration for Sentry.', config.sentry || _runtimeConfig);
1919

20-
const initConfig = Object.assign({}, config.sentry, _runtimeConfig || {});
20+
// Permanently merge options into config, preferring runtime config
21+
Object.assign(config.sentry, _runtimeConfig || {});
22+
const initConfig = Object.assign({}, config.sentry);
2123

2224
initConfig._metadata = initConfig._metadata || {};
2325
initConfig._metadata.sdk = {

0 commit comments

Comments
 (0)