From 071f0f5d250745e38cede2406e48505b8a78dbd4 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Sun, 2 Aug 2026 20:18:23 +0530 Subject: [PATCH] fix: code quality and safety improvements --- js/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/auth.js b/js/auth.js index a035cf2..b4fbad0 100644 --- a/js/auth.js +++ b/js/auth.js @@ -393,7 +393,7 @@ const profileInitial = document.getElementById("profile-avatar-initial"); if (profileInitial) { - profileInitial.textContent = String(loggedInUser.name || "U").trim().charAt(0).toUpperCase() || "U"; + profileInitial.textContent = String(loggedInUser.name || "U").trim()[0].toUpperCase() || "U"; } }