Check that usernameInput ref exists

This commit is contained in:
Pavel Djundik 2020-01-03 19:51:38 +02:00
parent 7b507e5248
commit c4ddf6d93e

View File

@ -187,6 +187,11 @@ export default {
},
methods: {
onNickChanged(event) {
// Username input is not available when useHexIp is set
if (!this.$refs.usernameInput) {
return;
}
if (
!this.$refs.usernameInput.value ||
this.$refs.usernameInput.value === this.previousUsername