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:
parent
1ce0463ad9
commit
0b60343a3b
1 changed files with 2 additions and 1 deletions
|
@ -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 = [];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue