mirror of
https://github.com/directus/directus.git
synced 2026-01-28 19:48:09 -05:00
fix field template removing text (#7549)
This commit is contained in:
@@ -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 += '');
|
||||
}, '');
|
||||
|
||||
Reference in New Issue
Block a user