From 9e33413b1e3e11404df021bc6a23cdcf40b72f42 Mon Sep 17 00:00:00 2001 From: Nitwel Date: Mon, 23 Aug 2021 17:20:33 +0200 Subject: [PATCH] fix field template removing text (#7549) --- app/src/components/v-field-template/v-field-template.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/components/v-field-template/v-field-template.vue b/app/src/components/v-field-template/v-field-template.vue index 7b8481679b..a9c2264e1d 100644 --- a/app/src/components/v-field-template/v-field-template.vue +++ b/app/src/components/v-field-template/v-field-template.vue @@ -247,10 +247,8 @@ export default defineComponent({ const el = node as HTMLElement; const tag = el.tagName; - if (tag) { - if (tag.toLowerCase() === 'button') return (acc += `{{${el.dataset.field}}}`); - if (tag.toLowerCase() === 'span') return (acc += el.textContent); - } + if (tag && tag.toLowerCase() === 'button') return (acc += `{{${el.dataset.field}}}`); + else if ('textContent' in el) return (acc += el.textContent); return (acc += ''); }, '');