Merge pull request #2558 from thelounge/xpaw/chantitle-undefined

Fix undefined channel when updating title
This commit is contained in:
Jérémie Astori 2018-06-14 18:44:36 -04:00 committed by GitHub
commit a81cef397c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,7 @@ function updateTitle() {
let title = $(document.body).data("app-name");
const chanTitle = $("#sidebar").find(".chan.active").attr("aria-label");
if (chanTitle.length > 0) {
if (chanTitle && chanTitle.length > 0) {
title = `${chanTitle}${title}`;
}