Skip to content

Cannot update state property via $patch with empty object #2242

Closed Answered by posva
jasonrsadler asked this question in Help and Questions
Discussion options

You must be logged in to vote

$patch() tries to recursively merge objects, therefore, an empty object doesn't change anything. Using the function syntax or directly changing the property is the correct way

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@posva
Comment options

Answer selected by posva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #2241 on May 30, 2023 23:02.