mirror of
https://github.com/Sonarr/Sonarr
synced 2025-12-06 08:28:37 +01:00
Fixed: Interactive searches causing multiple requests to indexers
This commit is contained in:
parent
fca8c36156
commit
3976e5daf7
1 changed files with 3 additions and 4 deletions
|
|
@ -161,13 +161,12 @@ function InteractiveSearch({ type, searchPayload }: InteractiveSearchProps) {
|
|||
);
|
||||
|
||||
useEffect(() => {
|
||||
// If search results are not yet isPopulated fetch them,
|
||||
// otherwise re-show the existing props.
|
||||
// Only fetch releases if they are not already being fetched and not yet populated.
|
||||
|
||||
if (!isPopulated) {
|
||||
if (!isFetching && !isPopulated) {
|
||||
dispatch(fetchReleases(searchPayload));
|
||||
}
|
||||
}, [isPopulated, searchPayload, dispatch]);
|
||||
}, [isFetching, isPopulated, searchPayload, dispatch]);
|
||||
|
||||
const errorMessage = getErrorMessage(error);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue