From 381a7b9d97ff3c94b4b21ece11736d02cc5a58ff Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Sat, 25 May 2024 14:45:42 -0700 Subject: [PATCH] feat: $this is $Irregular ( Fixes #219 ) Ifguarding myTypeData --- Irregular.ps.psm1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Irregular.ps.psm1 b/Irregular.ps.psm1 index 278c439..0e17267 100644 --- a/Irregular.ps.psm1 +++ b/Irregular.ps.psm1 @@ -35,7 +35,10 @@ Set-Alias Write-RegEx New-RegEx Set-Alias ?<.> Use-Regex $myTypeData = Get-TypeData -TypeName $MyModule.Name -$myMembers = @($myTypeData.Members.GetEnumerator()) + +$myMembers = if ($myTypeData) { + @($myTypeData.Members.GetEnumerator()) +} $KnownVerbs = Get-Verb | Select-Object -ExpandProperty Verb $myMemberCommands =