Skip to content

Commit

Permalink
fix(Update): fix -PassThru's ID added at the end
Browse files Browse the repository at this point in the history
Add it as a fake "id" property to a clone of the propList, so that the
formatting function can parse it in the correct order and place it at
the top.
  • Loading branch information
desjardinsm committed Feb 14, 2024
1 parent 32b3f7d commit 386c457
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Module/RicohAddressBook.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1018,9 +1018,9 @@ function Update-AddressBookEntry {
}

if ($PassThru) {
$result = Format-PropertyList $content.propList
Add-Member -InputObject $result -MemberType NoteProperty -Name ID -Value $Id
$result
$propList = $content.propList.Clone()
Add-Property $propList 'id' $Id
Format-PropertyList $propList
}
} catch {
Write-Error $_
Expand Down

0 comments on commit 386c457

Please sign in to comment.