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([]);
|
||||
setPeople([]);
|
||||
setCollections([]);
|
||||
setIsLoading(true);
|
||||
|
||||
if (!query) {
|
||||
setIsLoading(false);
|
||||
return;
|
||||
}
|
||||
|
||||
setIsLoading(true);
|
||||
|
||||
const apiClient = ServerConnections.getApiClient(serverId);
|
||||
const fetchPromises = [];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue