Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
s1gr1d committed Feb 29, 2024
1 parent 0a6730a commit 8c5ebc0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/astro/src/client/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ export function init(options: BrowserOptions): void {
}

function getDefaultIntegrations(options: BrowserOptions): Integration[] | undefined {
const defaultIntegrations = [...getBrowserDefaultIntegrations(options)];

// This evaluates to true unless __SENTRY_TRACING__ is text-replaced with "false",
// in which case everything inside will get treeshaken away
if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {
if (hasTracingEnabled(options)) {
return [...getBrowserDefaultIntegrations(options), browserTracingIntegration()];
return [...defaultIntegrations, browserTracingIntegration()];
}
}

return undefined;
return defaultIntegrations;
}

0 comments on commit 8c5ebc0

Please sign in to comment.