From 4f018ba23baa3a3be7206f77bdbc32a74f7d9297 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Thu, 14 Jun 2018 18:54:38 +0300 Subject: [PATCH] Fix undefined channel when updating title --- client/js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/js/utils.js b/client/js/utils.js index a840804c..41a5c8ec 100644 --- a/client/js/utils.js +++ b/client/js/utils.js @@ -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}`; }