From 83537f1c242682b52788d392cdfb54a07783a4a2 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Thu, 22 Jun 2023 11:21:17 +0200 Subject: [PATCH] Fixed regression with refs failing to reify --- .../methods/insertPropertyFromLibraryNode.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/imports/api/creature/creatureProperties/methods/insertPropertyFromLibraryNode.js b/app/imports/api/creature/creatureProperties/methods/insertPropertyFromLibraryNode.js index 641a9cfb..deb55bc7 100644 --- a/app/imports/api/creature/creatureProperties/methods/insertPropertyFromLibraryNode.js +++ b/app/imports/api/creature/creatureProperties/methods/insertPropertyFromLibraryNode.js @@ -98,13 +98,14 @@ function insertPropertyFromNode(nodeId, ancestors, order) { removed: { $ne: true }, }).fetch(); - // Convert all references into actual nodes - nodes = reifyNodeReferences(nodes); // The root node is first in the array of nodes // It must get the first generated ID to prevent flickering nodes = [node, ...nodes]; + // Convert all references into actual nodes + nodes = reifyNodeReferences(nodes); + // set libraryNodeIds storeLibraryNodeReferences(nodes);