diff --git a/terminus-terminal/src/shells/wsl.ts b/terminus-terminal/src/shells/wsl.ts index 696873f55d4b8522068d7de010244550985508e9..7ba58ed7964e370eea4a07adc7179ed2c87a5efe 100644 --- a/terminus-terminal/src/shells/wsl.ts +++ b/terminus-terminal/src/shells/wsl.ts @@ -88,7 +88,7 @@ export class WSLShellProvider extends ShellProvider { if (!childKey.DistributionName) { continue } - const wslVersion = childKey.Flags.value & 8 ? 2 : 1 + const wslVersion = (childKey.Flags?.value || 0) & 8 ? 2 : 1 const name = childKey.DistributionName.value const fsBase = wslVersion === 2 ? `\\\\wsl$\\${name}` : childKey.BasePath.value as string + '\\rootfs' const slug = slugify(name, { remove: /[:.]/g })