Skip to content
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

[Suggestion] Warn if user overrides Vue's internal methods #4041

Closed
phanan opened this issue Oct 27, 2016 · 1 comment
Closed

[Suggestion] Warn if user overrides Vue's internal methods #4041

phanan opened this issue Oct 27, 2016 · 1 comment

Comments

@phanan
Copy link
Member

phanan commented Oct 27, 2016

Currently, properties that start with _ or $ are not proxied on the Vue instance because they may conflict with Vue’s internal. The same doesn't apply for methods, leading to problematic cases like this one, where users may (accidentally) define methods which override Vue's internal API.

Suggestion: Though this arguably belongs in userland, it might be helpful of Vue to introduce a console warning (Warn: You're overriding Vue's internal method $emit. Be aware of misbehaviors.) for such cases.

@yyx990803
Copy link
Member

Yes - PR welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants