Uncaught TypeError: Cannot read property 'includes' of undefined
See original GitHub issueI am trying to solve this error I keep getting with vue-multiselect 2.0:
vue-multiselect.min.js?6cfa:1 Uncaught TypeError: Cannot read property ‘includes’ of undefined
I have no idea what that means.
data: function () {
return {
localOptions: [{ name: 'Test' }, { name: 'Foo' }, { name: 'Bar' }]
}
}
<multiselect
:options="localOptions"
:label="name"
:selected=""
:searchable="true"
@update="updateSelected"
@close="blur">
</multiselect>
What am I missing here?
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Cannot read property 'includes' of Undefined in JavaScript
The "Cannot read property 'includes' of undefined" error occurs when calling the includes() method on an undefined value. To solve the error, make...
Read more >JavaScript error: Cannot read property 'includes' of undefined
It's telling you that you're trying to access a property on an undefined object. The msgArr object doesn't have a property objectID at...
Read more >Cannot read property 'includes' of undefined #1474 - GitHub
Hi, we use got in many microservice and yesterday we upgrade v11.5.2 to v11.7.0. Since this upgrade we have some error. RequestError: Cannot...
Read more >Cannot read property 'includes' of undefined : r/learnjavascript
Problem: Uncaught TypeError: Cannot read property 'includes' of undefined. Hi there, I'm having an issue with my script. It shows this:.
Read more >cannot read properties of undefined (reading 'includes'
If the element at index 0 contains the innerHTML property, our if block will run, otherwise the else block is run. To solve...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you use the
:
before the prop-name, it is looking for a property in the component. In this case you want to just pass thename
string. Thus you should dotrack-by="name"
instead of:track-by="name"
.Exactly! Glad I could help!