fix infinite loading icon when searching for an invalid player
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m5s

This commit is contained in:
Lee
2024-04-18 07:59:03 +01:00
parent 0c4a1ebda9
commit 211807f494
4 changed files with 5 additions and 5 deletions

View File

@ -33,7 +33,7 @@ export function LookupPlayer({ currentPlayer }: PlayerLookupProps): ReactElement
}
// Ignore the same player
if (query.toLowerCase() == currentPlayer.toLowerCase()) {
if (currentPlayer !== undefined && query.toLowerCase() == currentPlayer.toLowerCase()) {
return;
}
@ -49,7 +49,7 @@ export function LookupPlayer({ currentPlayer }: PlayerLookupProps): ReactElement
description: (err as Error).message,
duration: 5000,
});
return;
return setLoading(false);
}
};

View File

@ -57,7 +57,7 @@ export function LookupServer({ currentPlatform, currentServer }: LookupServerPro
description: (err as Error).message,
duration: 5000,
});
return;
return setLoading(false);
}
};