From 538bfd2b6815871be710216bac51b8232ec7812b Mon Sep 17 00:00:00 2001 From: Damian-I Date: Sun, 9 Mar 2025 00:19:56 +0000 Subject: [PATCH] Add null checks to toggle button initialization to prevent errors --- index.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 9f47632..3754c5f 100644 --- a/index.html +++ b/index.html @@ -6406,15 +6406,21 @@ function initializeToggleButtons() { // Set up notes toggle button const notesToggle = document.getElementById('notes-toggle'); - notesToggle.addEventListener('click', toggleNotesPanel); + if (notesToggle) { + notesToggle.addEventListener('click', toggleNotesPanel); + } // Set up bluetooth toggle button const bluetoothToggle = document.getElementById('bluetooth-toggle'); - bluetoothToggle.addEventListener('click', toggleBluetoothPanel); + if (bluetoothToggle) { + bluetoothToggle.addEventListener('click', toggleBluetoothPanel); + } // Set up biometrics toggle button const biometricsToggle = document.getElementById('biometrics-toggle'); - biometricsToggle.addEventListener('click', toggleBiometricsPanel); + if (biometricsToggle) { + biometricsToggle.addEventListener('click', toggleBiometricsPanel); + } } // Call the initialization function when the game starts