How can I add new property to object? #723
Unanswered
pavankjadda
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Where is the update call? |
Beta Was this translation helpful? Give feedback.
2 replies
-
It's gone now. The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my entity store I defined
employee
state and store with few attributes.Employee.ts
Based on data received from backend I need to compute and update attribute like
employeeProjectsCount
and update the state. And this attribute is not defined in backend hence does not come as JSON response (However I defined it on TS Interface that maps to JSON data. See above)Here is the problem. When I compute and try to update the object I get error
cannot add property, object is not extensible
I use the following piece of code to update the object
Beta Was this translation helpful? Give feedback.
All reactions