From 19a9a2ce68d30623e4bad9cbfaf97e322674ef26 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Wed, 5 Aug 2026 18:03:18 +0530 Subject: [PATCH] fix: resolve 2 bugs in leetcode-ranking --- frontend/js/user/badges.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/js/user/badges.js b/frontend/js/user/badges.js index 97823f3c..c3ea9cc7 100644 --- a/frontend/js/user/badges.js +++ b/frontend/js/user/badges.js @@ -50,7 +50,7 @@ export async function loadBadges(data) { } if (isValid) { - const currentDay = history[history.length - 1]; + const currentDay = history.at(-1); const previousDay = history[history.length - 2]; const solvedToday = currentDay.easy +