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

Fix undo-manager not working on child trees #875

Merged
merged 1 commit into from
Jun 18, 2018

Conversation

marcofugaro
Copy link
Contributor

I've been using the undo-manager middleware, I found out it throws an error when the targetStore is not the root store.

This happens because the patch is saved with the path from the root store, and applied to the targetStore instead, if those are not the same, it throws an error.

This fixes it.

@mweststrate
Copy link
Member

Nice catch, thanks!

@mweststrate mweststrate merged commit 6e9da2f into mobxjs:master Jun 18, 2018
mweststrate added a commit that referenced this pull request Jun 18, 2018
Fix undo-manager not working on child trees
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

Successfully merging this pull request may close these issues.

2 participants