kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Merge branch 'useentity-error' into 'develop'
useEntity: don't refetch when there's an error See merge request soapbox-pub/soapbox!2613environments/review-renovate-r-pdslja/deployments/3639
commit
a6386a92ed
|
@ -51,7 +51,7 @@ function useEntity<TEntity extends Entity>(
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!isEnabled) return;
|
||||
if (!isEnabled || error) return;
|
||||
if (!entity || opts.refetch) {
|
||||
fetchEntity();
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue