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

In Doc._clearInflightOp, clear inflightOp before calling callbacks #273

Merged
merged 1 commit into from
Feb 28, 2019

Conversation

ericyhwang
Copy link
Contributor

This fixes a double-callback issue for chained op submissions, where if the second op is invalid, the first op's callback gets called twice:
#272

Doc._hardRollback already does takes a similar approach of clearing local Doc state prior to calling callbacks, and Nate expressed his agreement with this fix today at the PR review meeting.

Thanks to @nickasd and @alecgibson for developing the test case that reproduces the issue!

Fixes double-callback issue for chained op submissions where the second op is invalid:
#272
@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 95.85% when pulling cb79636 on fix-272 into 9c33e41 on master.

Copy link
Collaborator

@alecgibson alecgibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Great fix.

@ericyhwang ericyhwang merged commit a077121 into master Feb 28, 2019
@ericyhwang ericyhwang deleted the fix-272 branch February 28, 2019 22:40
@ericyhwang
Copy link
Contributor Author

Published in [email protected]

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.

3 participants