mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
Fix isWeb platform check
The new check should be safer
This commit is contained in:
parent
5b9fd525fa
commit
3f1206a355
|
@ -3,6 +3,9 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
export function isWeb(): boolean {
|
||||
return typeof process === 'undefined';
|
||||
// @ts-expect-error
|
||||
return typeof navigator !== 'undefined' && vscode.env.uiKind === vscode.UIKind.Web;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue