File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
typescript-language-features/src/utils Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -87,5 +87,5 @@ export function activate(context: vscode.ExtensionContext) {
87
87
88
88
function isWeb ( ) : boolean {
89
89
// @ts -expect-error
90
- return typeof navigator !== 'undefined' && vscode . env . uiKind === vscode . UIKind . Web ;
90
+ return ! ( typeof process === 'object' && ! ! process . versions . node ) && vscode . env . uiKind === vscode . UIKind . Web ;
91
91
}
Original file line number Diff line number Diff line change 6
6
import * as vscode from 'vscode' ;
7
7
8
8
export function isWeb ( ) : boolean {
9
- return 'navigator' in globalThis && vscode . env . uiKind === vscode . UIKind . Web ;
9
+ return ! ( typeof process === 'object' && ! ! process . versions . node ) && vscode . env . uiKind === vscode . UIKind . Web ;
10
10
}
11
11
12
12
export function isWebAndHasSharedArrayBuffers ( ) : boolean {
@@ -16,4 +16,3 @@ export function isWebAndHasSharedArrayBuffers(): boolean {
16
16
export function supportsReadableByteStreams ( ) : boolean {
17
17
return isWeb ( ) && 'ReadableByteStreamController' in globalThis ;
18
18
}
19
-
You can’t perform that action at this time.
0 commit comments