Browse Source

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

Leopoldthecoder 7 năm trước cách đây
mục cha
commit
2162240132
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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();
           }
         });