PowerShell / JEA

Just Enough Administration
http://aka.ms/JEAdocs
MIT License
257 stars 60 forks source link

Fix issue #45 #47

Closed jnury closed 6 years ago

jnury commented 6 years ago

Hello,

This is a fix for issue #45.

This issue was caused by the ComplexObjectsEqual function. This function compared the 2 strings resulting from the ConvertTo-Json of both objects.

For example, the function returned $false (not equal) for these 2 objects:

$object1 = @{
    First = 1
    Second = 2
    Third = 3
}

$object2 = @{
    First = 1
    Third = 3
    Second = 2
}

For our purpose, these 2 objects must be seen as equal.

The fixed function compares each property of both object recursively. Properties ordering is not verified.


This change is Reviewable

TravisEz13 commented 6 years ago

@PaulHigin Can you review?

jnury commented 6 years ago

This PR is not needed anymore as the issue was corrected by PR #57.