1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Move setIsLoading below if - Reduce calls

This commit is contained in:
Nathan G 2023-10-02 11:10:31 -07:00
parent 1ce0463ad9
commit 0b60343a3b

View file

@ -113,13 +113,14 @@ const SearchResults: FunctionComponent<SearchResultsProps> = ({ serverId = windo
setBooks([]);
setPeople([]);
setCollections([]);
setIsLoading(true);
if (!query) {
setIsLoading(false);
return;
}
setIsLoading(true);
const apiClient = ServerConnections.getApiClient(serverId);
const fetchPromises = [];