Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@zhangzhonghe
Copy link
Member

fix #6930


// #6930 avoid infinite recursion when reloading hmr components
if (__DEV__ && hmrDirtyComponents.has(instance.type)) {
hmrDirtyComponents.delete(instance.type)
Copy link
Member

Choose a reason for hiding this comment

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

Good catch!
I feel we should delete the dirty component here:

queueJob(instance.parent.update)

change the code as blow:

queueJob(() => {
  instance.parent.update()
  hmrDirtyComponents.delete(oldComp)
})

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks a lot for the suggestion!

@zhangzhonghe zhangzhonghe force-pushed the fix-6930 branch 2 times, most recently from 5392bfd to ebea034 Compare October 25, 2022 03:16
@haoqunjiang haoqunjiang added 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. ready for review This PR requires more reviews labels May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. ready for review This PR requires more reviews

Projects

Development

Successfully merging this pull request may close these issues.

Maxiumum call stack happens on HMR with :ref="setElement" and editing that component

4 participants