Skip to content

Commit 5de9a47

Browse files
author
Kapil Borle
committed
Merge pull request #464 from PowerShell/FixCustomRuleWithoutHelp
Fix loading custom rules that do not have comment help
2 parents 735e914 + 7d766f1 commit 5de9a47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Engine/ScriptAnalyzer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,8 @@ private List<ExternalRule> GetExternalRule(string[] moduleNames)
764764
{
765765
dynamic description = helpContent[0].Properties["Description"];
766766

767-
if (null != description)
768-
{
767+
if (null != description && null != description.Value && description.Value.GetType().IsArray)
768+
{
769769
desc = description.Value[0].Text;
770770
}
771771
}

0 commit comments

Comments
 (0)