Commit ce0da210 authored by 孙志东's avatar 孙志东 Committed by 杨奕

check popper exist before invoke scrollIntoView

parent 6e685a3f
......@@ -355,8 +355,10 @@
},
scrollToOption(className = 'selected') {
const menu = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');
scrollIntoView(menu, menu.getElementsByClassName(className)[0]);
if (this.$refs.popper) {
const menu = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');
scrollIntoView(menu, menu.getElementsByClassName(className)[0]);
}
},
handleMenuEnter() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment