Skip to content

2.5.14 introduces TypeError bind is not a function #8017

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

Closed
rjoo opened this issue Apr 13, 2018 · 2 comments · Fixed by #8974
Closed

2.5.14 introduces TypeError bind is not a function #8017

rjoo opened this issue Apr 13, 2018 · 2 comments · Fixed by #8974

Comments

@rjoo
Copy link

rjoo commented Apr 13, 2018

Version

2.5.14

Reproduction link

https://jsfiddle.net/bad4a8mb/1/

Steps to reproduce

Provide a non function to the bind utility method.

What is expected?

In <= 2.5.13, it rendered but failed silently: https://jsfiddle.net/ujxu9mvd/. Not sure if we'd want to keep that expectation, but existing projects will fail to render completely. A dev-mode warning at the very least will be helpful in identifying the issue.

What is actually happening?

Uncaught TypeError


The refactoring of the bind method to use the native bind, exposes a coding error when upgrading from 2.5.13. We have a fairly large codebase and one of the developers mistakenly added an object as a component method (eg. a global Vue events instance). It made its way into production and worked fine until upgrading to 2.5.14. It took a while to find it as there was no clear indication as to where the error was happening.

Some other devs experienced this as well:
#7491
324672a

@posva
Copy link
Member

posva commented Apr 13, 2018

A warning in dev mode would be fine

@thedamon
Copy link

thedamon commented Dec 6, 2018

This was a weird one to track down! We had a js file being destructured into a mixin, but one of the exports was an array.

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

Successfully merging a pull request may close this issue.

4 participants