Merge branch 'useentity-error' into 'develop'
useEntity: don't refetch when there's an error See merge request soapbox-pub/soapbox!2613
This commit is contained in:
commit
a6386a92ed
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ function useEntity<TEntity extends Entity>(
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!isEnabled) return;
|
||||
if (!isEnabled || error) return;
|
||||
if (!entity || opts.refetch) {
|
||||
fetchEntity();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue