fix build
This commit is contained in:
parent
6c32ada9b5
commit
65f805d98e
2
src/bootstrap-amd.js
vendored
2
src/bootstrap-amd.js
vendored
|
@ -29,7 +29,7 @@ if (process.env['ELECTRON_RUN_AS_NODE'] || process.versions['electron']) {
|
|||
}
|
||||
|
||||
// Pseudo NLS support
|
||||
if (nlsConfig?.pseudo) {
|
||||
if (nlsConfig && nlsConfig.pseudo) {
|
||||
loader(['vs/nls'], function (nlsPlugin) {
|
||||
nlsPlugin.setPseudoTranslation(nlsConfig.pseudo);
|
||||
});
|
||||
|
|
8
src/bootstrap-fork.js
vendored
8
src/bootstrap-fork.js
vendored
|
@ -81,7 +81,9 @@ function pipeLoggingToParent() {
|
|||
// to start the stacktrace where the console message was being written
|
||||
if (process.env.VSCODE_LOG_STACK === 'true') {
|
||||
const stack = new Error().stack;
|
||||
argsArray.push({ __$stack: stack?.split('\n').slice(3).join('\n') });
|
||||
if (stack) {
|
||||
argsArray.push({ __$stack: stack.split('\n').slice(3).join('\n') });
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -114,7 +116,9 @@ function pipeLoggingToParent() {
|
|||
*/
|
||||
function safeSend(arg) {
|
||||
try {
|
||||
process.send?.(arg);
|
||||
if (process.send) {
|
||||
process.send(arg);
|
||||
}
|
||||
} catch (error) {
|
||||
// Can happen if the parent channel is closed meanwhile
|
||||
}
|
||||
|
|
2
src/bootstrap-window.js
vendored
2
src/bootstrap-window.js
vendored
|
@ -61,7 +61,7 @@
|
|||
const enableDeveloperTools = (safeProcess.env['VSCODE_DEV'] || !!configuration.extensionDevelopmentPath) && !configuration.extensionTestsPath;
|
||||
let developerToolsUnbind;
|
||||
if (enableDeveloperTools || (options && options.forceEnableDeveloperKeybindings)) {
|
||||
developerToolsUnbind = registerDeveloperKeybindings(options?.disallowReloadKeybinding);
|
||||
developerToolsUnbind = registerDeveloperKeybindings(options && options.disallowReloadKeybinding);
|
||||
}
|
||||
|
||||
// Correctly inherit the parent's environment (TODO@sandbox non-sandboxed only)
|
||||
|
|
|
@ -107,7 +107,7 @@ crashReporter.start({
|
|||
// to ensure that no 'logs' folder is created on disk at a
|
||||
// location outside of the portable directory
|
||||
// (https://github.com/microsoft/vscode/issues/56651)
|
||||
if (portable?.isPortable) {
|
||||
if (portable && portable.isPortable) {
|
||||
app.setAppLogsPath(path.join(userDataPath, 'logs'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue