From 863caa3c5983da816ab72360fa7777d0f78f58b1 Mon Sep 17 00:00:00 2001 From: HikeMap User Date: Thu, 1 Jan 2026 12:37:21 -0600 Subject: [PATCH] Fix null reference errors - currently working according to my overlord MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixed updateUndoButton null reference at line 1543 - Added null check before accessing DOM element properties - Tracks now load properly - Hamburger menu confirmed functional - All critical JavaScript execution errors resolved This commit represents a stable, working state after multiple fix attempts documented in FIX_ATTEMPTS.md 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- index.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 3e77ea6..ce618e6 100644 --- a/index.html +++ b/index.html @@ -1540,9 +1540,11 @@ function updateUndoButton() { const btn = document.getElementById('undoBtn'); - btn.textContent = undoStack.length > 0 ? `Undo (${undoStack.length})` : 'Undo'; - btn.disabled = undoStack.length === 0; - btn.style.opacity = undoStack.length === 0 ? '0.5' : '1'; + if (btn) { + btn.textContent = undoStack.length > 0 ? `Undo (${undoStack.length})` : 'Undo'; + btn.disabled = undoStack.length === 0; + btn.style.opacity = undoStack.length === 0 ? '0.5' : '1'; + } } // GPS functions