datum
datum copied to clipboard
Merge-DatumArray doesn't always return an array
During some testing I found that the Merge-DatumArray function doesn't always return an array, but an OrderedDictionary. This results in an error when the next level is merged and Datum throwing the error:
Write-Warning -Message "Cannot merge different types in path '$StartingPath' REF:[hashtable] | DIFF:[hash_array] , returning most specific Datum."
I tracked down this issue to this line: https://github.com/gaelcolas/datum/blob/a028e8e805a24367083f351c584e14372e13fde3/source/Private/Merge-DatumArray.ps1#L170
By adding a , (comma) in front, the function will return an array:
, $mergedArray
@ykuijs, as mentioned I and @nyanhp have never observed this. Can you give us some data to reproduce this, please?