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

pull/11265/head
Leopoldthecoder 2018-05-21 17:40:47 +08:00
parent 38a13de337
commit 2162240132
1 changed files with 1 additions and 1 deletions

View File

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