From ffca3725bf3c88df5348b567cf2ffe9b52bba36d Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Tue, 21 Jan 2025 14:18:49 +0100 Subject: [PATCH] Fix notification elements checker --- src/pages/chat/chat.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/chat/chat.ts b/src/pages/chat/chat.ts index 06a24d9..17ceb24 100755 --- a/src/pages/chat/chat.ts +++ b/src/pages/chat/chat.ts @@ -103,6 +103,7 @@ class ChatElement extends HTMLElement { } }; + document.addEventListener('DOMContentLoaded', () => { this.notificationBadge = document.querySelector('.notification-badge'); this.notificationBoard = document.getElementById('notification-board'); this.notificationBell = document.getElementById('notification-bell'); @@ -110,6 +111,8 @@ class ChatElement extends HTMLElement { if (!this.notificationBadge || !this.notificationBoard || !this.notificationBell) { console.error('Notification elements not found'); } + }); + // Initialiser les événements de notification document.addEventListener('click', (event: Event): void => {