null => undefined

This commit is contained in:
jeanp413
2019-10-26 19:47:56 -05:00
parent 1d624a5672
commit c3d9cdb01b
3 changed files with 11 additions and 11 deletions

View File

@@ -156,7 +156,7 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
}
const activeWorkspaceRootUri = URI.revive(activeWorkspaceRootUriComponents);
let lastActiveWorkspace: IWorkspaceFolder | null = null;
let lastActiveWorkspace: IWorkspaceFolder | undefined;
if (activeWorkspaceRootUriComponents && activeWorkspaceRootUri) {
// Get the environment
const apiLastActiveWorkspace = await this._extHostWorkspace.getWorkspaceFolder(activeWorkspaceRootUri);
@@ -175,7 +175,7 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
// Get the initial cwd
const terminalConfig = configProvider.getConfiguration('terminal.integrated');
const initialCwd = terminalEnvironment.getCwd(shellLaunchConfig, os.homedir(), lastActiveWorkspace ? lastActiveWorkspace : undefined, this._variableResolver, activeWorkspaceRootUri, terminalConfig.cwd, this._logService);
const initialCwd = terminalEnvironment.getCwd(shellLaunchConfig, os.homedir(), lastActiveWorkspace, this._variableResolver, activeWorkspaceRootUri, terminalConfig.cwd, this._logService);
shellLaunchConfig.cwd = initialCwd;
const envFromConfig = this._apiInspectConfigToPlain(configProvider.getConfiguration('terminal.integrated').inspect<ITerminalEnvironment>(`env.${platformKey}`));