Skip to content

Commit

Permalink
Fix for Test-Json (#871)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Watherston <[email protected]>
  • Loading branch information
anwather and Anthony Watherston authored Feb 3, 2025
1 parent 88a405f commit 7d5e0e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Scripts/Helpers/Confirm-ObjectValueEqualityDeep.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function Confirm-ObjectValueEqualityDeep {
# This resolves a unique situation where GraphApi returns a string instead of an array for a metadata value, very unique situation
# By testing the json and count, we can confirm that it is a json string and convert it to an array
# 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
if ($(Test-Json -InputObject $Object1) -and $Object1.count -eq 1) {
if ($(Test-Json -Json $Object1) -and $Object1.count -eq 1) {
try {
$Object1 = $Object1 | ConvertFrom-Json -Depth 100
}
Expand All @@ -54,7 +54,7 @@ function Confirm-ObjectValueEqualityDeep {
# This resolves a unique situation where GraphApi returns a string instead of an array for a metadata value, very unique situation
# By testing the json and count, we can confirm that it is a json string and convert it to an array
# 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
if ($(Test-Json -InputObject $Object2) -and $Object2.count -eq 1) {
if ($(Test-Json -Json $Object2) -and $Object2.count -eq 1) {
try {
$Object2 = $Object2 | ConvertFrom-Json -Depth 100
}
Expand Down

0 comments on commit 7d5e0e8

Please sign in to comment.