diff --git a/js/admin.js b/js/admin.js index ccef75a..3aa01c7 100644 --- a/js/admin.js +++ b/js/admin.js @@ -27,7 +27,7 @@ function showAdminSection(sectionId) { function loadAdminData() { document.getElementById('totalMatches').textContent = tournamentMatches.length; document.getElementById('totalPlayers').textContent = Object.keys(playersData).length; - document.getElementById('totalUsers').textContent = users.length; + document.getElementById('totalUsers').textContent = typeof users !== 'undefined' ? users.length : 0; const allPredictions = JSON.parse(localStorage.getItem('userPredictions') || '[]'); document.getElementById('totalPredictions').textContent = allPredictions.length;