-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
fix(customFormatter): properly accessing ref value during debugger #12948
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
Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-ssr
@vue/compiler-sfc
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
return [ | ||
'div', | ||
{}, | ||
['span', vueStyle, genRefFlag(obj)], | ||
'<', | ||
// avoid debugger accessing value affecting behavior |
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.
This makes me wonder if it wasn't intentional to completely avoid calling the getter
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.
It was originally obj.value
, but it was changed to the current implementation in https://github.com/vuejs/core/pull/10397/files#diff-95f4e5cf8305f906512f733429443451392894309ce012c5a70216f9e578738eL41. I think this change may not have considered the case where the value of ._value
is undefined
when .value
is not accessed. So I think we should continue using obj.value
, but not track it.
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.
Sounds good to me. I thought that maybe displaying undefined
for a value that was never accessed before was the expected behavior
This is a major pain for debugging, I hope this gets merged soon |
Yass, thanks 🙌 |
@edison1105 |
@mrleblanc101 |
close #12946