From a20110974d781e972831fa8a52a0839a613121f6 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 4 Oct 2021 11:07:47 -0400 Subject: [PATCH] fix: ensures non populated relationships still retain IDs --- src/fields/relationshipPopulationPromise.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fields/relationshipPopulationPromise.ts b/src/fields/relationshipPopulationPromise.ts index 0cf39bd1e4c..5a9d1fc68c2 100644 --- a/src/fields/relationshipPopulationPromise.ts +++ b/src/fields/relationshipPopulationPromise.ts @@ -38,7 +38,7 @@ const populate = async ({ idString = idString.toString(); } - let populatedRelationship = null; + let populatedRelationship; if (depth && currentDepth <= depth) { populatedRelationship = await payload.operations.collections.findByID({