Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling clone() or reset() does not reset to null #170

Open
juw177 opened this issue Apr 1, 2024 · 0 comments
Open

Calling clone() or reset() does not reset to null #170

juw177 opened this issue Apr 1, 2024 · 0 comments

Comments

@juw177
Copy link

juw177 commented Apr 1, 2024

If a clonedInstance has:

{ updatedProperty: test }

originalInstance has

{ updatedProperty: null }

Calling clonedInstance.reset() or originalInstance.clone() will not reset updatedProperty back to null and it remains as "test". Is this intended?

The only way I could reset the clone is by removing it from the store and getting it again:
if (instance.__isClone) {
instance.removeFromStore()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant