Skip to content

Commit 669c71b

Browse files
committed
build fix
1 parent 33df6a0 commit 669c71b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/nextjs/src/client/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,18 @@ function getDefaultIntegrations(options: BrowserOptions): Integration[] {
154154
const manualSpotlight = globalWithInjectedValues._sentrySpotlightManual;
155155
// Also check raw globalThis directly in case GLOBAL_OBJ differs
156156
const rawGlobalThis = typeof globalThis !== 'undefined' ? globalThis : undefined;
157-
const rawManualSpotlight = rawGlobalThis ? (rawGlobalThis as Record<string, unknown>)._sentrySpotlightManual : undefined;
158-
const spotlightEnvValue = processEnvSpotlight || globalSpotlight || manualSpotlight || rawManualSpotlight;
157+
const rawManualSpotlightRaw = rawGlobalThis ? (rawGlobalThis as Record<string, unknown>)._sentrySpotlightManual : undefined;
158+
const rawManualSpotlight = typeof rawManualSpotlightRaw === 'string' ? rawManualSpotlightRaw : undefined;
159+
const spotlightEnvValue: string | undefined =
160+
processEnvSpotlight || globalSpotlight || manualSpotlight || rawManualSpotlight;
159161

160162
// Expose debug info on globalThis for test verification
161163
if (rawGlobalThis) {
162164
(rawGlobalThis as Record<string, unknown>)._sentrySpotlightDebug = {
163165
processEnvSpotlight,
164166
globalSpotlight,
165167
manualSpotlight,
168+
rawManualSpotlightRaw,
166169
rawManualSpotlight,
167170
spotlightEnvValue,
168171
optionsSpotlight: options.spotlight,
@@ -175,6 +178,7 @@ function getDefaultIntegrations(options: BrowserOptions): Integration[] {
175178
'process.env._sentrySpotlight': processEnvSpotlight,
176179
'globalThis._sentrySpotlight': globalSpotlight,
177180
'globalThis._sentrySpotlightManual': manualSpotlight,
181+
'rawGlobalThis._sentrySpotlightManual (raw)': rawManualSpotlightRaw,
178182
'rawGlobalThis._sentrySpotlightManual': rawManualSpotlight,
179183
resolved: spotlightEnvValue,
180184
'options.spotlight': options.spotlight,

0 commit comments

Comments
 (0)