Skip to content

Commit

Permalink
Move conditional logic inside getRemixDefaultIntegrations.
Browse files Browse the repository at this point in the history
  • Loading branch information
onurtemizkan committed Jun 13, 2024
1 parent 2cf2b91 commit b44dd02
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/remix/src/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ export function getRemixDefaultIntegrations(options: RemixOptions): Integration[
return [
...getDefaultNodeIntegrations(options as NodeOptions).filter(integration => integration.name !== 'Http'),
httpIntegration(),
];
options.autoInstrumentRemix ? remixIntegration() : undefined,
].filter(int => int) as Integration[];
}

/**
Expand All @@ -167,10 +168,7 @@ export function init(options: RemixOptions): void {
return;
}

options.defaultIntegrations = [
...getRemixDefaultIntegrations(options as NodeOptions),
options.autoInstrumentRemix ? remixIntegration() : undefined,
].filter(int => int) as Integration[];
options.defaultIntegrations = getRemixDefaultIntegrations(options as NodeOptions);

nodeInit(options as NodeOptions);

Expand Down

0 comments on commit b44dd02

Please sign in to comment.