From 89beada5b906da82d0d12c2018960ea02b5a54c6 Mon Sep 17 00:00:00 2001 From: Juanma Hidalgo Date: Fri, 3 Jan 2025 19:49:30 +0100 Subject: [PATCH] fix: infinite loading in the asset list component (#2345) * fix: infinite loading in the asset list component * feat: add count !== undefined check --- webapp/src/components/AssetList/AssetList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/components/AssetList/AssetList.tsx b/webapp/src/components/AssetList/AssetList.tsx index ef56201d04..53bda9a84a 100644 --- a/webapp/src/components/AssetList/AssetList.tsx +++ b/webapp/src/components/AssetList/AssetList.tsx @@ -44,7 +44,7 @@ const AssetList = (props: Props) => { ) const maxQuerySize = getMaxQuerySize(vendor) - const hasMorePages = (assets.length !== count || count === maxQuerySize) && page <= MAX_PAGE + const hasMorePages = !isLoading && count !== undefined && (assets.length !== count || count === maxQuerySize) && page <= MAX_PAGE const emptyStateTranslationString = useMemo(() => { if (assets.length > 0) {