From 24eeb5519ad8f0a0ef938a03f493a31f4d3ba520 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 17 May 2024 13:52:45 +0200 Subject: [PATCH] style updates --- src/components/ui/FetchedTags.vue | 32 +++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/components/ui/FetchedTags.vue b/src/components/ui/FetchedTags.vue index 8a01c1e79..2e2e9b6e3 100644 --- a/src/components/ui/FetchedTags.vue +++ b/src/components/ui/FetchedTags.vue @@ -26,7 +26,9 @@ const tags = computed(() => { .filter((i) => i.startsWith(`${$props.tag}`)) .reduce((acc, tag) => { const n = tag.split(`${$props.tag}`)[1]; - acc[$props.item[`${$props.tag}${n}`]] = $props.item[`${$props.value}${n}`]; + const key = `${$props.tag}${n}`; + const value = `${$props.value}${n}`; + acc[$props.item[key] ?? key] = $props.item[value] ?? ''; return acc; }, {}); }); @@ -49,11 +51,29 @@ const tags = computed(() => {