From 7c2b6b73e3ac3fc6d91c6ce0a17d2abb5b070309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C=20=D0=9D=D0=B0=D0=B4=D0=B5?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Sun, 30 Nov 2025 12:21:36 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BD=D1=8B=20console.?= =?UTF-8?q?warn=20=D0=B8=D0=B7=20chatListFilter=20=D0=B8=20chatListRealtim?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Модули теперь тихо выходят, если не находят элементы (не на странице чатов), вместо того чтобы засорять консоль предупреждениями на всех остальных страницах. --- backend/static/js/components/chatListFilter.js | 2 +- backend/static/js/components/chatListRealtime.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/static/js/components/chatListFilter.js b/backend/static/js/components/chatListFilter.js index 913dd6fe..01c8bc2c 100644 --- a/backend/static/js/components/chatListFilter.js +++ b/backend/static/js/components/chatListFilter.js @@ -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; } diff --git a/backend/static/js/components/chatListRealtime.js b/backend/static/js/components/chatListRealtime.js index c22d0854..4f5d7822 100644 --- a/backend/static/js/components/chatListRealtime.js +++ b/backend/static/js/components/chatListRealtime.js @@ -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; }