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

Problems with "Cannot read property 'length' of undefined" #34

Closed
egorikas opened this issue Apr 13, 2017 · 6 comments
Closed

Problems with "Cannot read property 'length' of undefined" #34

egorikas opened this issue Apr 13, 2017 · 6 comments

Comments

@egorikas
Copy link
Contributor

Hi.

I've started to use your library recently. And unfortunately faced a problem with "Cannot read property 'length' of undefined" for previousValue in updateValue method.
I suppose, that problem appears when some component values are set in the beforeMount method.

I've tried to fix this problem.

Thank you

@sneila
Copy link

sneila commented Apr 24, 2017

add "typeof previousValue != 'undefined' " on line 46 in dist/index.js to solve it:

...
if (force || value && value !== previousValue && typeof previousValue != 'undefined' && value.length > previousValue.length) {
...

@egorikas
Copy link
Contributor Author

egorikas commented Apr 24, 2017

@sneila Thank you for your comment. I'll think about it

@probil
Copy link
Owner

probil commented Apr 24, 2017

I will apply this fix ASAP

@arthurvasconcelos
Copy link

I am facing the same problem. Thanks for the solution @sneila.

Excellent lib @probil.

@probil
Copy link
Owner

probil commented Apr 25, 2017

@arthurvasconcelos just merged and published to npm

@probil
Copy link
Owner

probil commented Apr 25, 2017

Should be fixed in v1.1.1. Under review now

@probil probil added this to TODO in v2 Apr 28, 2017
@probil probil closed this as completed May 3, 2017
@probil probil moved this from TODO to In Review in v2 May 24, 2017
@probil probil moved this from In Review to DONE in v2 May 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
v2
DONE
Development

No branches or pull requests

4 participants