ngneat / elf

🧙‍♀️ A Reactive Store with Magical Powers
https://ngneat.github.io/elf/
MIT License
1.62k stars 93 forks source link

fix(entities): correct behavior of `upsertEntities` with duplicate entities #519

Closed Char2sGu closed 7 months ago

Char2sGu commented 7 months ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #518

What is the new behavior?

For duplicate entities, the latter one will be merged into the former one. The resulting ids array will not have duplicate ids.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

stackblitz[bot] commented 7 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.