You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The template ref-removal behavior in 2.7.0-alpha differs from 2.6, but it's consistent with Vue 3 (demo) and with @vue/composition-api in Vue 2.6 (demo).
Changing that line's null to undefined would restore the original behavior, but would cause inconsistencies with Vue 3. I think it was actually intentional, as the unit tests even explicitly check for null. Perhaps migration docs should be added.
I don't think is a problem.When the node or component doesn't exit,the component's $refs should delete related key.so return undefined rather than null
Version
2.7.0-alpha.5
Reproduction link
codepen.io
Steps to reproduce
Press the toggle button to cycle the ref
Working case with v2.6.14: https://codepen.io/pdanpdan/pen/QWQVXmr
Failing case with v2.7.0-alpha.5: https://codepen.io/pdanpdan/pen/JjpaQOP
What is expected?
this.$refs.test to be an element or undefined
What is actually happening?
this.$refs.test is null
The text was updated successfully, but these errors were encountered: