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
*/
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;