Skip to content

Commit 4c6aaad

Browse files
committed
fallback
1 parent 42d832c commit 4c6aaad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/nextjs/src/client/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const globalWithInjectedValues = GLOBAL_OBJ as typeof GLOBAL_OBJ & {
4343
_sentryBasePath?: string;
4444
_sentryRelease?: string;
4545
_experimentalThirdPartyOriginStackFrames?: string;
46+
_sentrySpotlight?: string;
4647
};
4748

4849
// Treeshakable guard to remove all code related to tracing
@@ -145,7 +146,7 @@ function getDefaultIntegrations(options: BrowserOptions): Integration[] {
145146
// Auto-enable Spotlight from NEXT_PUBLIC_SENTRY_SPOTLIGHT env var
146147
// The value is injected at build time via buildTimeVariables in withSentryConfig
147148
// following the same pattern as _sentryRelease
148-
const spotlightEnvValue = process.env._sentrySpotlight;
149+
const spotlightEnvValue = process.env._sentrySpotlight || globalWithInjectedValues._sentrySpotlight;
149150
if (spotlightEnvValue !== undefined && options.spotlight === undefined) {
150151
const boolValue = envToBool(spotlightEnvValue, { strict: true });
151152
const spotlightConfig = boolValue !== null ? boolValue : spotlightEnvValue;

0 commit comments

Comments
 (0)