-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Description
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
What is the current behavior?
updateOne/updateMany updates ids state when updating existing entity.
Expected behavior:
updateOne/updateMany should not change ids state if you attempt to update an entity that has already been added.
Minimal reproduction of the problem with instructions:
Did not run it, but try something like that
it('should not change ids state if you attempt to update an entity that has already been added', () => {
const withOne = adapter.addOne(TheGreatGatsby, state);
const changes = { title: 'A New Hope' };
const withUpdates = adapter.updateOne(
{
id: TheGreatGatsby.id,
changes,
},
withOne
);
expect(withOne.ids).toBe(withUpdates.ids);
});
Version of affected browser(s),operating system(s), npm, node and ngrx:
Other information:
Reactions are currently unavailable