From d0ddd82906b546e4f21edefd61445a57db179416 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Tue, 18 Feb 2020 10:52:17 +0100 Subject: [PATCH] fixed wsl crash when default distro is not available (fixes #2130) --- terminus-terminal/src/shells/wsl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminus-terminal/src/shells/wsl.ts b/terminus-terminal/src/shells/wsl.ts index e184bc53..9f4af037 100644 --- a/terminus-terminal/src/shells/wsl.ts +++ b/terminus-terminal/src/shells/wsl.ts @@ -52,7 +52,7 @@ export class WSLShellProvider extends ShellProvider { if (null != lxss && null != lxss.DefaultDistribution) { const defaultDistKey = wnr.getRegistryKey(wnr.HK.CU, lxssPath + '\\' + String(lxss.DefaultDistribution.value)) - if (defaultDistKey.DistributionName) { + if (defaultDistKey?.DistributionName) { const shell: Shell = { id: 'wsl', name: 'WSL / Default distro',