浏览代码

Popover: execute focus on instance only if it is a function

Leopoldthecoder 7 年之前
父节点
当前提交
2162240132
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/popover/src/main.vue

+ 1 - 1
packages/popover/src/main.vue

@@ -90,7 +90,7 @@ export default {
         on(reference, 'focusin', () => {
           this.handleFocus();
           const instance = reference.__vue__;
-          if (instance && instance.focus) {
+          if (instance && typeof instance.focus === 'function') {
             instance.focus();
           }
         });