You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minimal reproduction of the bug/regression with instructions:
I have an object that has some optional fields.
Let say that the interface looks like the following:
interfaceMyObject{propA: string;propB?: string;}
If at a given point in time the object is set in the store with both properties and I want to remove the optional one later, I can (using update or upsert).
The repro doesn't need a full ngrx repro, following should be enough:
Object.assign({},{propA: 'a original',propB: 'B original'},{propA: 'a updated and optional B is not needed anymore!'}// note that I'm trying to remove propB here!);
Output:
{ propA: "a updated and optional B is not needed anymore!", propB: "B original" }
Expected behavior:
Output should be:
{ propA: "a updated and optional B is not needed anymore!" }
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):
Ngrx 8.2.0
I would be willing to submit a PR to fix this issue
[x] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No
I could work on a PR if I'm not the only one considering the current behavior as a bug :)
The text was updated successfully, but these errors were encountered:
Indeed. Feels like passing an option to the method might be a good think rather than having to set all the fields to remove to null or undefined though.
Minimal reproduction of the bug/regression with instructions:
I have an object that has some optional fields.
Let say that the interface looks like the following:
If at a given point in time the object is set in the store with both properties and I want to remove the optional one later, I can (using update or upsert).
CF this line:
platform/modules/entity/src/unsorted_state_adapter.ts
Line 100 in 4e4c50f
The repro doesn't need a full ngrx repro, following should be enough:
Output:
Expected behavior:
Output should be:
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):
Ngrx
8.2.0
I would be willing to submit a PR to fix this issue
[x] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No
I could work on a PR if I'm not the only one considering the current behavior as a bug :)
The text was updated successfully, but these errors were encountered: