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
2.0.5 introduced a feature that Vue warns if user is trying to override an internal method. It's a good thing, though I think the current detecting implementation is debatable.
According to this commit, every method on Vue's prototype is checked. But not everything there is necessarily an internal method. For example, if I manually add a method to Vue.prototype, and try to manipulate this method later on, I'll get a warning. Same thing happens when a third party package adds some method to Vue.prototype.
Such cases can be confusing because the method that gets warned is not actually shipped with Vue itself. Any chance this will get improved?
The text was updated successfully, but these errors were encountered:
Hi, I have considered this case in this commit. My opinion is that if a third library added a method on Vue's prototype, the library author probably don't want it get changed by end users. Can you elaborate your situation more?
If that will be long, we can migrate it to forum. https://forum.vuejs.org/
2.0.5 introduced a feature that Vue warns if user is trying to override an internal method. It's a good thing, though I think the current detecting implementation is debatable.
According to this commit, every method on Vue's prototype is checked. But not everything there is necessarily an internal method. For example, if I manually add a method to
Vue.prototype
, and try to manipulate this method later on, I'll get a warning. Same thing happens when a third party package adds some method toVue.prototype
.Such cases can be confusing because the method that gets warned is not actually shipped with Vue itself. Any chance this will get improved?
The text was updated successfully, but these errors were encountered: