From e0e6a72d92ab1a26fb58ab084adde8c1a12362e0 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 18 Apr 2024 06:36:40 +0100 Subject: [PATCH] fix server page --- src/app/(pages)/server/[platform]/[[...hostname]]/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/(pages)/server/[platform]/[[...hostname]]/page.tsx b/src/app/(pages)/server/[platform]/[[...hostname]]/page.tsx index 409b622..8bdc818 100644 --- a/src/app/(pages)/server/[platform]/[[...hostname]]/page.tsx +++ b/src/app/(pages)/server/[platform]/[[...hostname]]/page.tsx @@ -34,10 +34,10 @@ type Params = { * @returns the favicon url or null if there is no favicon */ function getFavicon( - platform: ServerPlatform, + platform: ServerPlatform | null, server: CachedJavaMinecraftServer | CachedBedrockMinecraftServer | undefined, ): string | undefined { - if (platform === ServerPlatform.Bedrock) { + if (server == null || platform === ServerPlatform.Bedrock) { return config.apiUrl + "/server/icon/fallback"; } server = server as CachedJavaMinecraftServer;