Fixed some issues with effect tag targeting

This commit is contained in:
Stefan Zermatten
2022-08-15 10:53:38 +02:00
parent 2bb3265356
commit 99e4e8d6bb
3 changed files with 4 additions and 2 deletions

View File

@@ -178,8 +178,8 @@ function getTargetListFromTags(tags, computation){
const targetTagIdLists = [];
if (!tags) return [];
tags.forEach(tag => {
const idList = computation.propsWithTag[tag];
if (idList) targetTagIdLists.push(idList);
const idList = computation.propsWithTag[tag] || [];
targetTagIdLists.push(idList);
});
const targets = intersection(...targetTagIdLists);
return targets;

View File

@@ -28,6 +28,7 @@ function computedOnlyField(field){
[`${field}.effects`]: {
type: Array,
optional: true,
removeBeforeCompute: true,
},
[`${field}.effects.$`]: {
type: Object,

View File

@@ -51,6 +51,7 @@
<div
v-if="calculation && calculation.effects"
class="flex-grow-1"
style="max-width: 100%;"
>
<inline-effect
v-if="typeof calculation.value === 'number'"