Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if profile name is null return undefined #136438

Merged
merged 3 commits into from
Nov 4, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
convert to undefined when getValue happens
meganrogge committed Nov 4, 2021
commit 4f0e12a14b9717170f414ce40fca67ad58b9a759
Original file line number Diff line number Diff line change
@@ -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</*ext id*/string, Map</*provider id*/string, ITerminalProfileProvider>> = 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);
}