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

Treat null scripture input as empty array #2522

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

CarsonF
Copy link
Member

@CarsonF CarsonF commented Sep 8, 2022

This is consistent with other value handling, even for arrays. User.roles treats null as empty array too via uniq() transform.

This fixes isScriptureEqual being passed an unexpected null here:

scriptureReferences: ifDiff(isScriptureEqual)(
input.scriptureReferences,

┆Issue is synchronized with this Monday item by Unito

This is consistent with other value handling, even for arrays.
User.roles treats null as empty array too via `uniq()`` transform.

This fixes `isScriptureEqual` being passed an unexpected null here:
https://github.com/SeedCompany/cord-api-v3/blob/5b5fae84facb9da06fbb8d2ecb8af708c0d5a1c8/src/components/product/product.service.ts#L454-L455
@CarsonF
Copy link
Member Author

CarsonF commented Sep 8, 2022

Yeah tests are right. scriptureReferencesOverride is unique in that null means something different than empty array.

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.

None yet

2 participants