Merge pull request #3662 from thelounge/xpaw/fix-ref

Check that usernameInput ref exists
This commit is contained in:
Pavel Djundik 2020-01-04 15:20:16 +02:00 committed by GitHub
commit e0cd9cbcdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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