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

feat(scheduler): prevent from maximum recursive updates #456

Merged
merged 2 commits into from
Nov 14, 2019

Conversation

theniceangel
Copy link
Contributor

The demo is as follows:

  const state = reactive({ count: 0 })
  let dummy
  watch(() => {
    dummy = state.count
    state.count++
  })

flushPostFlushCbs dost not check maximum recursive updates, the code above will cause a maximum call exceed

@yyx990803 yyx990803 merged commit aa6c67e into vuejs:master Nov 14, 2019
@yyx990803
Copy link
Member

Good catch. I just realized we are missing tests for the scheduler due to a big refactor. Would you be interested in adding some? (can be based on these old tests)

@vue-bot
Copy link
Contributor

vue-bot commented Nov 14, 2019

Hey @theniceangel, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚

@theniceangel
Copy link
Contributor Author

@yyx990803 no problem.

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