Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing incorrect null-checks in Input/Output and help handling #593

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/platyPS/platyPS.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -2867,7 +2867,7 @@ function ConvertPsObjectsToMamlModel
}

#Get Description
if($Help.description -ne $null)
if($null -ne $Help.description)
{
$MamlCommandObject.Description = New-Object -TypeName Markdown.MAML.Model.Markdown.SectionBody (
$Help.description |
Expand Down Expand Up @@ -2930,7 +2930,7 @@ function ConvertPsObjectsToMamlModel
$Help.inputTypes.inputType | ForEach-Object {
$InputDescription = $_.description
$inputtypes = $_.type.name
if ($_.description -eq $null -and $_.type.name -ne $null)
if ($null -eq $_.description -and $null -ne $_.type.name)
{
$inputtypes = $_.type.name.split("`n", [System.StringSplitOptions]::RemoveEmptyEntries)
}
Expand All @@ -2957,7 +2957,7 @@ function ConvertPsObjectsToMamlModel
$Help.returnValues.returnValue | ForEach-Object {
$OuputDescription = $_.description
$Outputtypes = $_.type.name
if ($_.description -eq $null -and $_.type.name -ne $null)
if ($null -eq $_.description -and $null -ne $_.type.name)
{
$Outputtypes = $_.type.name.split("`n", [System.StringSplitOptions]::RemoveEmptyEntries)
}
Expand Down