Skip to content

Commit

Permalink
Important fix for DefaultValue parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
raandree authored and gaelcolas committed Apr 9, 2021
1 parent ccdb487 commit a028e8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/ScriptsToProcess/Resolve-NodeProperty.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function Global:Resolve-NodeProperty

[Parameter(Position = 1)]
[AllowNull()]
[object[]]
[object]
$DefaultValue,

[Parameter(Position = 3)]
Expand Down Expand Up @@ -61,7 +61,7 @@ function Global:Resolve-NodeProperty
$result = $DefaultValue
Write-Debug "`t`tDefault Found"
}
elseif ($PSBoundParameters.ContainsKey(('DefaultValue') -and $null -eq $DefaultValue))
elseif ($PSBoundParameters.ContainsKey('DefaultValue') -and $null -eq $DefaultValue)
{
$result = $null
$nullAllowed = $true
Expand Down

0 comments on commit a028e8e

Please sign in to comment.