Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip comparing parameter values that are both null (#540) #541

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aurelschwitter
Copy link

Due to the nature that "[]" evaluates to $null when passed into ConvertFrom-Json, Compare-Object throws an error that the ReferenceObject cannot be null.

This change first compares the deployedObject and payloadObject if both are non-null and only then passes the two object to Compare-Object.
If one of the objects is null and the other is not, it will still throw an error, but the script will still stop the triggers as before which is good in this case (null != non-null).

For more details, see #540

@aurelschwitter aurelschwitter force-pushed the fix/540-trigger-payload-empty-array-issue branch from 87cd66b to cd9d4c9 Compare February 23, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant