fix table infinite loop if user doesn't have read permissions

This commit is contained in:
Sidney Alcantara
2022-11-28 18:18:26 +11:00
parent 1ac3afdac1
commit 1f28a8cb5b

View File

@@ -215,7 +215,7 @@ export function useFirestoreCollectionWithAtom<T = TableRow>(
setDataAtom([]);
suspended = false;
}
if (nextPageAtom) setNextPageAtom({ loading: false, available: true });
if (nextPageAtom) setNextPageAtom({ loading: false, available: false });
if (onError) onError(error);
else handleError(error);
}