-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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(hmr): avoid infinite recursion when reloading hmr components (#6930) #6936
Conversation
|
||
// #6930 avoid infinite recursion when reloading hmr components | ||
if (__DEV__ && hmrDirtyComponents.has(instance.type)) { | ||
hmrDirtyComponents.delete(instance.type) |
There was a problem hiding this comment.
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:
core/packages/runtime-core/src/hmr.ts
Line 138 in b0b74a1
queueJob(instance.parent.update) |
change the code as blow:
queueJob(() => {
instance.parent.update()
hmrDirtyComponents.delete(oldComp)
})
There was a problem hiding this comment.
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!
5392bfd
to
ebea034
Compare
ebea034
to
b446fe3
Compare
b446fe3
to
5dde129
Compare
fix #6930