fix infinite loading icon when searching for an invalid player
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m5s
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m5s
This commit is contained in:
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ export function LookupServer({ currentPlatform, currentServer }: LookupServerPro
|
||||
description: (err as Error).message,
|
||||
duration: 5000,
|
||||
});
|
||||
return;
|
||||
return setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user