From 612fcca68c07795ced8d056914666049a5055d49 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Mon, 22 Feb 2021 14:30:50 +0200 Subject: [PATCH] Only split properties accross targets if there are targets --- app/imports/api/creature/actions/applyProperties.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/imports/api/creature/actions/applyProperties.js b/app/imports/api/creature/actions/applyProperties.js index 7d657374..c078f87a 100644 --- a/app/imports/api/creature/actions/applyProperties.js +++ b/app/imports/api/creature/actions/applyProperties.js @@ -62,7 +62,7 @@ function applyPropertyAndWalkChildren({prop, child, targets, ...options}){ export default function applyProperties({ forest, targets, ...options}){ forest.forEach(child => { let prop = child.node; - if (shouldSplit(prop)){ + if (shouldSplit(prop) && targets.length){ targets.forEach(target => { let targets = [target] applyPropertyAndWalkChildren({ targets, prop, child, ...options});