Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

Commit 6f81f50

Browse files
committed
fix(select): fix error of the dynamic set options
1 parent 01d3662 commit 6f81f50

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/varlet-vue2-ui/src/select/Select.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ export default defineComponent({
249249
250250
findLabel(value) {
251251
const { options } = this
252+
253+
if (!options.length) {
254+
return
255+
}
256+
252257
let option = options.find((option) => option.value === value)
253258
254259
if (!option) {

0 commit comments

Comments
 (0)