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

Cannot read property 'length' of undefined (this.search) #58

Closed
antongorodezkiy opened this issue Jul 12, 2016 · 4 comments
Closed

Cannot read property 'length' of undefined (this.search) #58

antongorodezkiy opened this issue Jul 12, 2016 · 4 comments
Labels

Comments

@antongorodezkiy
Copy link

I've faced the following error:

vue.common.js:1019 [Vue warn]: Error when evaluating expression "filteredOptions.length === 0 && search.length": TypeError: Cannot read property 'length' of undefined (found in component: <multiselect>)

Changing v-show="filteredOptions.length === 0 && search && search.length" to v-show="filteredOptions.length === 0 && search && search.length" seems could fix it.

For now I just override the template.

@shentao
Copy link
Owner

shentao commented Jul 12, 2016

Will look into it. Thanks! :)

@shentao
Copy link
Owner

shentao commented Jul 13, 2016

Working on a new release right now. I will implement this fix there.
You can actually just write v-show="filteredOptions.length === 0 && search" and it works this way.

shentao pushed a commit that referenced this issue Jul 13, 2016
* Fixes #6
* Fixes #58
* Related to #48
* Simplify search element management

* Still needs more tests and update to older tests for new use cases
@antongorodezkiy
Copy link
Author

Thank you!

@shentao shentao added the bug label Jul 15, 2016
@shentao
Copy link
Owner

shentao commented Jul 15, 2016

@antongorodezkiy Fixed in 0.3.1

shentao pushed a commit that referenced this issue Jul 31, 2016
* Fixes #6
* Fixes #58
* Related to #48
* Simplify search element management

* Still needs more tests and update to older tests for new use cases
shentao pushed a commit that referenced this issue Sep 18, 2016
* Fixes #6
* Fixes #58
* Related to #48
* Simplify search element management

* Still needs more tests and update to older tests for new use cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants