Use linux icon by default when no WSL profile icon is found

This commit is contained in:
Liangcheng Juves 2022-05-15 13:56:57 +08:00
parent ec22c00ba5
commit a5fb726206

View File

@ -62,7 +62,8 @@ export class WSLShellProvider extends ShellProvider {
TERM: 'xterm-color',
COLORTERM: 'truecolor',
},
icon: wslIconMap[defaultDistKey.DistributionName.value],
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
icon: wslIconMap[defaultDistKey.DistributionName.value] ?? wslIconMap.Linux,
}
shells.push(shell)
}
@ -103,7 +104,8 @@ export class WSLShellProvider extends ShellProvider {
TERM: 'xterm-color',
COLORTERM: 'truecolor',
},
icon: wslIconMap[name],
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
icon: wslIconMap[name] ?? wslIconMap.Linux,
}
shells.push(shell)
}