Skip to content

Commit 7d5e0e8

Browse files
anwatherAnthony Watherston
and
Anthony Watherston
authored
Fix for Test-Json (#871)
Co-authored-by: Anthony Watherston <Anthony.Watherston@microsoft.com>
1 parent 88a405f commit 7d5e0e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Scripts/Helpers/Confirm-ObjectValueEqualityDeep.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function Confirm-ObjectValueEqualityDeep {
4040
# This resolves a unique situation where GraphApi returns a string instead of an array for a metadata value, very unique situation
4141
# By testing the json and count, we can confirm that it is a json string and convert it to an array
4242
# A try catch is included to revert to the value we normally use in the event of failure just in case there is a scenario that has not been accounted for
43-
if ($(Test-Json -InputObject $Object1) -and $Object1.count -eq 1) {
43+
if ($(Test-Json -Json $Object1) -and $Object1.count -eq 1) {
4444
try {
4545
$Object1 = $Object1 | ConvertFrom-Json -Depth 100
4646
}
@@ -54,7 +54,7 @@ function Confirm-ObjectValueEqualityDeep {
5454
# This resolves a unique situation where GraphApi returns a string instead of an array for a metadata value, very unique situation
5555
# By testing the json and count, we can confirm that it is a json string and convert it to an array
5656
# A try catch is included to revert to the value we normally use in the event of failure just in case there is a scenario that has not been accounted for
57-
if ($(Test-Json -InputObject $Object2) -and $Object2.count -eq 1) {
57+
if ($(Test-Json -Json $Object2) -and $Object2.count -eq 1) {
5858
try {
5959
$Object2 = $Object2 | ConvertFrom-Json -Depth 100
6060
}

0 commit comments

Comments
 (0)