fix server page
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m3s

This commit is contained in:
Lee 2024-04-18 06:36:40 +01:00
parent 6238400ffe
commit e0e6a72d92

@ -34,10 +34,10 @@ type Params = {
* @returns the favicon url or null if there is no favicon * @returns the favicon url or null if there is no favicon
*/ */
function getFavicon( function getFavicon(
platform: ServerPlatform, platform: ServerPlatform | null,
server: CachedJavaMinecraftServer | CachedBedrockMinecraftServer | undefined, server: CachedJavaMinecraftServer | CachedBedrockMinecraftServer | undefined,
): string | undefined { ): string | undefined {
if (platform === ServerPlatform.Bedrock) { if (server == null || platform === ServerPlatform.Bedrock) {
return config.apiUrl + "/server/icon/fallback"; return config.apiUrl + "/server/icon/fallback";
} }
server = server as CachedJavaMinecraftServer; server = server as CachedJavaMinecraftServer;