From 4f0e12a14b9717170f414ce40fca67ad58b9a759 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Thu, 4 Nov 2021 07:03:59 -0700 Subject: [PATCH] convert to undefined when getValue happens --- .../contrib/terminal/browser/terminalProfileService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalProfileService.ts b/src/vs/workbench/contrib/terminal/browser/terminalProfileService.ts index aee1244bec839..ebc64e5a6813a 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalProfileService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalProfileService.ts @@ -34,7 +34,7 @@ export class TerminalProfileService implements ITerminalProfileService { private _profilesReadyBarrier: AutoOpenBarrier; private _availableProfiles: ITerminalProfile[] | undefined; private _contributedProfiles: IExtensionTerminalProfile[] = []; - private _defaultProfileName: string | null = null; + private _defaultProfileName?: string; private readonly _profileProviders: Map> = new Map(); private readonly _primaryOffProcessTerminalService?: IOffProcessTerminalService; @@ -139,7 +139,7 @@ export class TerminalProfileService implements ITerminalProfileService { return this._availableProfiles || []; } const platform = await this._getPlatformKey(); - this._defaultProfileName = this._configurationService.getValue(`${TerminalSettingPrefix.DefaultProfile}${platform}`); + this._defaultProfileName = this._configurationService.getValue(`${TerminalSettingPrefix.DefaultProfile}${platform}`) ?? undefined; return this._primaryOffProcessTerminalService?.getProfiles(this._configurationService.getValue(`${TerminalSettingPrefix.Profiles}${platform}`), this._defaultProfileName, includeDetectedProfiles); }