Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed May 12, 2021
1 parent fd52949 commit 608d03b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/vs/base/common/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ declare const self: unknown;
export const globals: any = (typeof self === 'object' ? self : typeof global === 'object' ? global : {});

let nodeProcess: INodeProcess | undefined = undefined;
if (typeof globals.vscode !== 'undefined') {
if (typeof globals.vscode !== 'undefined' && typeof globals.vscode.process !== 'undefined') {
// Native environment (sandboxed)
nodeProcess = globals.vscode.process;
} else if (typeof process !== 'undefined') {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/common/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let safeProcess: INodeProcess & { nextTick: (callback: (...args: any[]) => void)
declare const process: INodeProcess;

// Native sandbox environment
if (typeof globals.vscode !== 'undefined') {
if (typeof globals.vscode !== 'undefined' && typeof globals.vscode.process !== 'undefined') {
const sandboxProcess: INodeProcess = globals.vscode.process;
safeProcess = {
get platform() { return sandboxProcess.platform; },
Expand Down
2 changes: 1 addition & 1 deletion src/vs/platform/product/common/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { ISandboxConfiguration } from 'vs/base/parts/sandbox/common/sandboxTypes
let product: IProductConfiguration;

// Native sandbox environment
if (typeof globals.vscode !== 'undefined') {
if (typeof globals.vscode !== 'undefined' && typeof globals.vscode.context !== 'undefined') {
const configuration: ISandboxConfiguration | undefined = globals.vscode.context.configuration();
if (configuration) {
product = configuration.product;
Expand Down

0 comments on commit 608d03b

Please sign in to comment.