File tree Expand file tree Collapse file tree
packages/shared/src/telemetry Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,11 +42,15 @@ const CI_ENV_VARS = [
4242
4343function isServerRuntime ( ) : boolean {
4444 // Skip in browsers.
45- if ( typeof window !== 'undefined' ) return false ;
45+ if ( typeof window !== 'undefined' ) {
46+ return false ;
47+ }
4648 // Skip in Next.js Edge Runtime, which exposes a global `EdgeRuntime` marker. We detect via
4749 // this marker (rather than checking `process.versions`) because the Edge Runtime build-time
4850 // analyzer flags any reachable read of `process.versions` even when it sits behind a guard.
49- if ( typeof ( globalThis as { EdgeRuntime ?: string } ) . EdgeRuntime !== 'undefined' ) return false ;
51+ if ( typeof ( globalThis as { EdgeRuntime ?: string } ) . EdgeRuntime !== 'undefined' ) {
52+ return false ;
53+ }
5054 return true ;
5155}
5256
You can’t perform that action at this time.
0 commit comments