From 63acd6b0b973e4417323e704451fb4ff8cc5291e Mon Sep 17 00:00:00 2001
From: Pinapelz <yukais@pinapelz.com>
Date: Tue, 4 Nov 2025 18:41:06 -0800
Subject: fix case where name appears as undefined on score page

---
 frontend/src/pages/Score.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'frontend/src/pages/Score.tsx')

diff --git a/frontend/src/pages/Score.tsx b/frontend/src/pages/Score.tsx
index 3701b1f..fb6db90 100644
--- a/frontend/src/pages/Score.tsx
+++ b/frontend/src/pages/Score.tsx
@@ -104,7 +104,7 @@ const Score = () => {
         } else {
           url.searchParams.append("userId", user.id.toString());
         }
-        if(targetUserId !== user.id.toString()){
+        if(targetUserId && targetUserId !== user.id.toString()){
           setViewingOwnScores(false);
         }
         else{
@@ -179,7 +179,7 @@ const Score = () => {
 
   if (isLoading || loading) {
     return (
-      <LoadingDisplay message={"Loading Your Scores for " + formattedGameName}/>
+      <LoadingDisplay message={"Loading Scores for " + formattedGameName}/>
     );
   }
 
-- 
cgit v1.2.3

