Skip to content

Commit 87cd66b

Browse files
Fix wrong or logic in statement
1 parent 39c0737 commit 87cd66b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,9 @@ function Compare-TriggerPipelineReference {
427427
} else {
428428
$deployedValueObj = ConvertFrom-Json $deployedValue.ToString()
429429
$payloadValueObj = ConvertFrom-Json $payloadValue.ToString()
430-
# when both are null, do not compare them
431-
if ($null -ne $deployedValueObj -and $null -ne $payloadValueObj) {
430+
# only compare the objects when one of them is non-null
431+
if ($null -ne $deployedValueObj -or $null -ne $payloadValueObj) {
432+
}
432433
$paramValueChanges = Compare-Object -ReferenceObject $deployedValueObj -DifferenceObject $payloadValueObj
433434
}
434435
}

0 commit comments

Comments
 (0)