From 70e79a5264e91efa9658afd8c973d0d34fbd986c Mon Sep 17 00:00:00 2001 From: Ante Primorac Date: Mon, 31 Aug 2020 16:08:11 +0200 Subject: [PATCH] fix: collection documents property --- server/presenters/collection.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/server/presenters/collection.js b/server/presenters/collection.js index c8a021a09d..e7ee1762e6 100644 --- a/server/presenters/collection.js +++ b/server/presenters/collection.js @@ -20,14 +20,8 @@ export default function present(collection: Collection) { createdAt: collection.createdAt, updatedAt: collection.updatedAt, deletedAt: collection.deletedAt, - documents: undefined, + documents: collection.documentStructure ? collection.documentStructure : [], }; - if (collection.type === "atlas") { - data.documents = collection.documentStructure - ? collection.documentStructure - : []; - } - return data; }