We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b03868c commit a5f6addCopy full SHA for a5f6add
src/components/Select.vue
@@ -904,18 +904,12 @@
904
* @return {Boolean} True when selected | False otherwise
905
*/
906
isOptionSelected(option) {
907
- let selected = false
908
- let i = 0
909
- while (!selected && i < this.valueAsArray.length) {
910
- let value = this.valueAsArray[i]
+ return this.valueAsArray.some(value => {
911
if (typeof value === 'object') {
912
- selected = this.optionObjectComparator(value, option)
913
- } else if (value === option || value === option[i]) {
914
- selected = true
+ return this.optionObjectComparator(value, option)
915
}
916
- i++
917
- }
918
- return selected
+ return value === option || value === option[this.index]
+ })
919
},
920
921
/**
0 commit comments