Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(ember): Allow initing Ember without config entry #3745

Merged
merged 1 commit into from
Jun 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/ember/addon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ export function InitSentryForEmber(_runtimeConfig: BrowserOptions | undefined) {
assert('Missing configuration.', config);
assert('Missing configuration for Sentry.', config.sentry || _runtimeConfig);

if (!config.sentry) {
// If environment config is not specified but the above assertion passes, use runtime config.
config.sentry = { ..._runtimeConfig } as any;
}

// Permanently merge options into config, preferring runtime config
Object.assign(config.sentry, _runtimeConfig || {});
const initConfig = Object.assign({}, config.sentry);
Expand Down