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

[2.0.0-rc.1] Improve error message when function doesn't exist for v-on #3430

Closed
Async0x42 opened this issue Aug 12, 2016 · 2 comments
Closed

Comments

@Async0x42
Copy link
Contributor

For example: @chartclick="onChartClicked", if there is no: methods: { onChartClicked () { ...etc } }, then vuejs will report something like:

vue.common.js:1406 Uncaught TypeError: o.fn is not a function
(anonymous function) @ vue.common.js:1406
Vue.$emit @ vue.common.js:2142

I think there should be an error message as this isn't very clear that the method is missing.

@yyx990803
Copy link
Member

There should be a "property does not exist" warning if you are using Chrome/FF/Edge. I've added a warning for with the event name too.

@Async0x42
Copy link
Contributor Author

I'm using Chrome, but originally, I was only getting this exception being thrown with no warnings or messages.

If I recall correctly, I think I had seen a message about a property after trying various things, but normally I'd just get this exception thrown.

Thanks for the change!

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