Skip to content

Commit 0364537

Browse files
authored
fix(node): Don't warn about Spotlight on empty NODE_ENV (#16381)
When running with `spotlight: true` I got a warning about not being in development mode when `NODE_ENV` was not set. This typically indicates dev mode so added a check for that.
1 parent c297bf9 commit 0364537

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/node/src/integrations/spotlight.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ const _spotlightIntegration = ((options: Partial<SpotlightConnectionOptions> = {
2020
return {
2121
name: INTEGRATION_NAME,
2222
setup(client) {
23-
if (typeof process === 'object' && process.env && process.env.NODE_ENV !== 'development') {
23+
if (
24+
typeof process === 'object' &&
25+
process.env &&
26+
process.env.NODE_ENV &&
27+
process.env.NODE_ENV !== 'development'
28+
) {
2429
logger.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?");
2530
}
2631
connectToSpotlight(client, _options);

0 commit comments

Comments
 (0)