fix: collection documents property

This commit is contained in:
Ante Primorac committed 2020-08-31 16:08:11 +02:00
1 parent da3d08566e
commit 70e79a5264
1 file changed
+1 -7
+1 -7
View File
@@ -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;
}