From 29c75c77f9439bd6599634d81b6fc3b2d1d502f5 Mon Sep 17 00:00:00 2001
From: mat <github@matdoes.dev>
Date: Sun, 10 Apr 2022 19:15:34 -0500
Subject: fix <Username> for players without username

---
 src/lib/minecraft/Username.svelte | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'src/lib/minecraft/Username.svelte')

diff --git a/src/lib/minecraft/Username.svelte b/src/lib/minecraft/Username.svelte
index f6f9911..f083723 100644
--- a/src/lib/minecraft/Username.svelte
+++ b/src/lib/minecraft/Username.svelte
@@ -16,9 +16,13 @@
 </script>
 
 <ConditionalLink
-	href="/player/{typeof hyperlinkToProfile === 'string'
-		? `${player.username}/${hyperlinkToProfile}`
-		: player.username}"
+	href="/player/{player.username
+		? typeof hyperlinkToProfile === 'string'
+			? `${player.username}/${hyperlinkToProfile}`
+			: player.username
+		: typeof hyperlinkToProfile === 'string'
+		? `${player.uuid}/${hyperlinkToProfile}`
+		: player.uuid}"
 	isWrapped={!!hyperlinkToProfile}
 >
 	{#if headType == '3d'}
-- 
cgit 

