Focus only if component has input (3769)

This commit is contained in:
Sergio Crisostomo 2018-06-04 09:52:20 +02:00
parent ed4bb14303
commit 9e375e6712

View file

@ -668,7 +668,7 @@
this.reset(); this.reset();
}, },
focus() { focus() {
this.$refs.input.focus(); this.$refs.input && this.$refs.input.focus();
} }
}, },
watch: { watch: {