`updateEntities` tries updating entities even if they're not in the store
EricPoul opened this issue · 0 comments
EricPoul commented
Which @ngneat/elf-* package(s) are the source of the bug?
entities
Is this a regression?
Yes
Description
Here https://github.com/ngneat/elf/blob/master/packages/entities/src/lib/update.mutation.ts#L57 a check has not been presented on whether the store contains an entity with a passed id or not. In the Akita
it's there https://github.com/salesforce/akita/blob/master/packages/akita/src/lib/updateEntities.ts#L26.
Because of that it returns undefined
in the updater
instead of an entity or creates a new partial entity if updater
is a partial object.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
No response
Anything else?
No response
Do you want to create a pull request?
Yes