File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -92,9 +92,10 @@ export class WebSocketFactory {
9292 }
9393 }
9494
95- if ( typeof process !== 'undefined' ) {
96- // Use dynamic property access to avoid Next.js Edge Runtime static analysis warnings
97- const processVersions = ( process as any ) [ 'versions' ]
95+ // Use dynamic property access to avoid Next.js Edge Runtime static analysis warnings
96+ const _process = ( globalThis as any ) [ 'process' ]
97+ if ( _process ) {
98+ const processVersions = _process [ 'versions' ]
9899 if ( processVersions && processVersions [ 'node' ] ) {
99100 // Remove 'v' prefix if present and parse the major version
100101 const versionString = processVersions [ 'node' ]
Original file line number Diff line number Diff line change @@ -72,12 +72,13 @@ function shouldShowDeprecationWarning(): boolean {
7272 }
7373
7474 // Skip if process is not available (e.g., Edge Runtime)
75- if ( typeof process === 'undefined' ) {
75+ // Use dynamic property access to avoid Next.js Edge Runtime static analysis warnings
76+ const _process = ( globalThis as any ) [ 'process' ]
77+ if ( ! _process ) {
7678 return false
7779 }
7880
79- // Use dynamic property access to avoid Next.js Edge Runtime static analysis warnings
80- const processVersion = ( process as any ) [ 'version' ]
81+ const processVersion = _process [ 'version' ]
8182 if ( processVersion === undefined || processVersion === null ) {
8283 return false
8384 }
You can’t perform that action at this time.
0 commit comments