mirror of
https://github.com/Micke-K/IntuneManagement.git
synced 2026-09-28 10:55:38 +02:00
3.10.1.16
Issue 378 - Fixed issue when "Sort Json Properties" is enabled. Arrays were broken e.g. empty array ended up as null and single item ended up as string. This broke export/import of Conditional Access policies.
This commit is contained in:
@@ -4872,6 +4872,15 @@ function Invoke-SortJsonGraphObject {
|
|||||||
else {
|
else {
|
||||||
$result[$p] = $null
|
$result[$p] = $null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($InputObject.$p -is [Array] -and $result[$p] -isnot [Array]) {
|
||||||
|
if($result[$p] -eq $null) {
|
||||||
|
$result[$p] = @()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$result[$p] = @($result[$p])
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [pscustomobject]$result
|
return [pscustomobject]$result
|
||||||
|
|||||||
Reference in New Issue
Block a user