From 0949d30cf084e7d565b1dd823d78deabd8dd66e1 Mon Sep 17 00:00:00 2001 From: Michael Pretorius Date: Mon, 13 May 2024 14:31:36 +0200 Subject: [PATCH] fix: fix length check --- src/handlers/claims_handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handlers/claims_handler.ts b/src/handlers/claims_handler.ts index b307eba..8f68b02 100644 --- a/src/handlers/claims_handler.ts +++ b/src/handlers/claims_handler.ts @@ -121,7 +121,7 @@ export const getAllClaimTypesFromCellnode = async () => { export const getClaimTypesFromCellnode = async (collectionID: string) => { // first get all claims with type null const collectionClaims = await getCollectionClaimsTypeNull(collectionID, 150); - if (collectionClaims.length < 1) return; + if (collectionClaims && collectionClaims.length < 1) return; // get Collection Entity to get Collection Cellnode Service URI const collectionEntity = await getCollectionEntity(collectionID); if (!collectionEntity) return;