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([]); setBooks([]);
setPeople([]); setPeople([]);
setCollections([]); setCollections([]);
setIsLoading(true);
if (!query) { if (!query) {
setIsLoading(false); setIsLoading(false);
return; return;
} }
setIsLoading(true);
const apiClient = ServerConnections.getApiClient(serverId); const apiClient = ServerConnections.getApiClient(serverId);
const fetchPromises = []; const fetchPromises = [];