mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 20:40:15 +02:00
fix itemCount not updating properly on zero value
This commit is contained in:
@@ -94,7 +94,7 @@ export const useItemListInfiniteLoader = ({
|
||||
const { setItemCount } = useListContext();
|
||||
|
||||
useEffect(() => {
|
||||
if (!totalItemCount || !setItemCount) {
|
||||
if (totalItemCount == null || !setItemCount) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ export const useItemListPaginatedLoader = ({
|
||||
const { setItemCount } = useListContext();
|
||||
|
||||
useEffect(() => {
|
||||
if (!totalItemCount || !setItemCount) {
|
||||
if (totalItemCount == null || !setItemCount) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user