From 221ec0bb10d49b14eea8d0522f87dd0f37ec4e23 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 21 Oct 2020 17:58:36 -0400 Subject: [PATCH] takes copy of all docs found by ID in case they were memoized --- src/collections/operations/findByID.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/collections/operations/findByID.js b/src/collections/operations/findByID.js index 87c02b793d..3fb4c4230e 100644 --- a/src/collections/operations/findByID.js +++ b/src/collections/operations/findByID.js @@ -75,6 +75,9 @@ async function findByID(args) { return null; } + // Clone the result - it may have come back memoized + result = JSON.parse(JSON.stringify(result)); + result.id = result._id; // /////////////////////////////////////