Fix undefined channel when updating title

This commit is contained in:
Pavel Djundik 2018-06-14 18:54:38 +03:00
parent 65bd014a21
commit 4f018ba23b

View File

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