Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit e54b47c

Browse files
ErikMinekustychenjiajun
authored andcommitted
fix(list): Prevent accessing selectedIndex when this.mdcList is undefined (#484)
1 parent 939ff45 commit e54b47c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/list/List.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ export default {
176176
}
177177
},
178178
onAction (e) {
179-
this.$emit('change', this.mdcList.selectedIndex)
179+
if (this.mdcList) {
180+
this.$emit('change', this.mdcList.selectedIndex)
181+
}
180182
this.$emit('action', e.detail)
181183
}
182184
}

0 commit comments

Comments
 (0)