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 issue is that during the initial render, $refs isn't populated. Overall though, I'd say that code is probably not good. $refs shouldn't be used inside templates, it's an escape hatch to be used in code.
You can avoid the bug by adding a method to your component which then calls the linked component like so: https://jsfiddle.net/vrLubr46/13/
Version
2.5.16
Reproduction link
https://jsfiddle.net/vrLubr46/5/
Steps to reproduce
TypeError: "$refs.test is undefined"
If you add modifier (.prevent .stop etc.) to
@click
error will goneWhat is expected?
Need work without any modifiers
What is actually happening?
javascript error occurs
The text was updated successfully, but these errors were encountered: