File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,10 @@ function filterDuplicates(integrations: Integration[]): Integration[] {
2323
2424/** Gets integration to install */
2525export function getIntegrationsToSetup ( options : Options ) : Integration [ ] {
26- const carrier = getMainCarrier ( ) ;
27- const autoloadedIntegrations = carrier . __SENTRY__ ?. integrations || [ ] ;
2826 const defaultIntegrations = ( options . defaultIntegrations && [ ...options . defaultIntegrations ] ) || [ ] ;
2927 const userIntegrations = options . integrations ;
3028
31- let integrations : Integration [ ] = [ ...filterDuplicates ( defaultIntegrations ) , ... autoloadedIntegrations ] ;
29+ let integrations : Integration [ ] = [ ...filterDuplicates ( defaultIntegrations ) ] ;
3230
3331 if ( Array . isArray ( userIntegrations ) ) {
3432 // Filter out integrations that are also included in user options
Original file line number Diff line number Diff line change @@ -77,8 +77,11 @@ export const defaultIntegrations = [
7777 * @see {@link NodeOptions } for documentation on configuration options.
7878 */
7979export function init ( options : NodeOptions = { } ) : void {
80+ const carrier = getMainCarrier ( ) ;
81+ const autoloadedIntegrations = carrier . __SENTRY__ ?. integrations || [ ] ;
82+
8083 if ( options . defaultIntegrations === undefined ) {
81- options . defaultIntegrations = defaultIntegrations ;
84+ options . defaultIntegrations = [ ... defaultIntegrations , ... autoloadedIntegrations ] ;
8285 }
8386
8487 if ( options . dsn === undefined && process . env . SENTRY_DSN ) {
You can’t perform that action at this time.
0 commit comments