diff --git a/plugins/catalog-react/src/hooks/useEntityListProvider.tsx b/plugins/catalog-react/src/hooks/useEntityListProvider.tsx index c6a35be367..66043ad237 100644 --- a/plugins/catalog-react/src/hooks/useEntityListProvider.tsx +++ b/plugins/catalog-react/src/hooks/useEntityListProvider.tsx @@ -311,6 +311,7 @@ export const EntityListProvider = ( if (isEqual(fetchParams, lastFetchParamsRef.current)) { return; } + const prevFetchParams = lastFetchParamsRef.current; lastFetchParamsRef.current = fetchParams; const gen = ++fetchGenRef.current; @@ -324,6 +325,7 @@ export const EntityListProvider = ( } } catch (e) { if (gen === fetchGenRef.current) { + lastFetchParamsRef.current = prevFetchParams; setError(e as Error); } } finally {