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 history .undo() - unnecessary condition #470

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

whitcik
Copy link

@whitcik whitcik commented Jan 26, 2017

Hi, I think that throw Error is unnecessary, becouse if in the tree is stored value that returns false in the if condition you can't use methods .undo (), because it always returns throw error.
This blocking me, because I have a lot of value in the tree like null, false and i get error when i try undo to this value.

@Yomguithereal
Copy link
Owner

Hello @whitcik. You are right, there is a bug here. However, instead of just dropping this condition, it would be better to change the way the method and the Archive class works so that we may throw the error when needed.

@whitcik
Copy link
Author

whitcik commented Jan 26, 2017

@Yomguithereal hmm, what do you want to change in class Archive and method? I think that works well, and there is no need throw the error.

@Yomguithereal
Copy link
Owner

There is a need to throw an error if you attempt to go back further than it is possible.

@whitcik
Copy link
Author

whitcik commented Jan 26, 2017

@Yomguithereal I added throw an error in Archive.back(), please check this

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

Successfully merging this pull request may close these issues.

2 participants