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.
2 parents f5b2a32 + a5f6add commit 8a601c0Copy full SHA for 8a601c0
src/components/Select.vue
@@ -915,15 +915,12 @@
915
* @return {Boolean} True when selected | False otherwise
916
*/
917
isOptionSelected(option) {
918
- let selected = false
919
- this.valueAsArray.forEach(value => {
920
- if (typeof value === 'object' && this.optionObjectComparator(value, option)) {
921
- selected = true
922
- } else if (value === option || value === option[this.index]) {
923
924
- }
925
- })
926
- return selected
+ return this.valueAsArray.some(value => {
+ if (typeof value === 'object') {
+ return this.optionObjectComparator(value, option)
+ }
+ return value === option || value === option[this.index]
+ })
927
},
928
929
/**
0 commit comments