Убраны console.warn из chatListFilter и chatListRealtime
Модули теперь тихо выходят, если не находят элементы (не на странице чатов), вместо того чтобы засорять консоль предупреждениями на всех остальных страницах.
This commit is contained in:
parent
625c7bfebd
commit
7c2b6b73e3
@ -32,7 +32,7 @@ export function initChatListFilter(options = {}) {
|
||||
const labels = document.querySelectorAll(filterSelector);
|
||||
|
||||
if (!search || !labels.length) {
|
||||
console.warn(`ChatListFilter: elements not found`);
|
||||
// Тихо выходим если не на странице чатов
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ export function initChatListRealtime(options = {}) {
|
||||
// Проверяем наличие списка чатов
|
||||
const listAny = document.querySelector(chatRowSelector);
|
||||
if (!listAny) {
|
||||
console.warn('ChatListRealtime: no chat rows found, skipping');
|
||||
// Тихо выходим если не на странице чатов
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user