Skip to content

Commit 8a601c0

Browse files
author
Jeff
committed
Merge branch 'fix_for_issue_671' of https://github.com/totola-clx/vue-select into totola-clx-fix_for_issue_671
# Conflicts: # src/components/Select.vue
2 parents f5b2a32 + a5f6add commit 8a601c0

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/components/Select.vue

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -915,15 +915,12 @@
915915
* @return {Boolean} True when selected | False otherwise
916916
*/
917917
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-
selected = true
924-
}
925-
})
926-
return selected
918+
return this.valueAsArray.some(value => {
919+
if (typeof value === 'object') {
920+
return this.optionObjectComparator(value, option)
921+
}
922+
return value === option || value === option[this.index]
923+
})
927924
},
928925
929926
/**

0 commit comments

Comments
 (0)