Skip to content

Commit b44dd02

Browse files
committed
Move conditional logic inside getRemixDefaultIntegrations.
1 parent 2cf2b91 commit b44dd02

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/remix/src/index.server.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ export function getRemixDefaultIntegrations(options: RemixOptions): Integration[
140140
return [
141141
...getDefaultNodeIntegrations(options as NodeOptions).filter(integration => integration.name !== 'Http'),
142142
httpIntegration(),
143-
];
143+
options.autoInstrumentRemix ? remixIntegration() : undefined,
144+
].filter(int => int) as Integration[];
144145
}
145146

146147
/**
@@ -167,10 +168,7 @@ export function init(options: RemixOptions): void {
167168
return;
168169
}
169170

170-
options.defaultIntegrations = [
171-
...getRemixDefaultIntegrations(options as NodeOptions),
172-
options.autoInstrumentRemix ? remixIntegration() : undefined,
173-
].filter(int => int) as Integration[];
171+
options.defaultIntegrations = getRemixDefaultIntegrations(options as NodeOptions);
174172

175173
nodeInit(options as NodeOptions);
176174

0 commit comments

Comments
 (0)