From af17eb7c3c102915eff820c1d9da91a900322c1d Mon Sep 17 00:00:00 2001 From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com> Date: Fri, 15 Mar 2024 16:52:48 +0100 Subject: [PATCH] test element count directly --- client/src/stores/collectionElementsStore.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/stores/collectionElementsStore.ts b/client/src/stores/collectionElementsStore.ts index ac04e1839611..73c63ade28a2 100644 --- a/client/src/stores/collectionElementsStore.ts +++ b/client/src/stores/collectionElementsStore.ts @@ -74,7 +74,7 @@ export const useCollectionElementsStore = defineStore("collectionElementsStore", const collectionKey = getCollectionKey(collection); try { - if (storedElements.length !== 0) { + if (collection.element_count !== null) { // We should fetch only missing (placeholder) elements from the range const firstMissingIndexInRange = storedElements .slice(offset, offset + limit)