From e111a3d60267d265b48f089f6ddd2048aee09e44 Mon Sep 17 00:00:00 2001 From: Leo Roettele Date: Wed, 15 Mar 2023 11:49:43 +0100 Subject: [PATCH] Add patch to prevent empty tags carried over. --- src/utils/dom.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/dom.js b/src/utils/dom.js index c9d00887..e9ba8192 100644 --- a/src/utils/dom.js +++ b/src/utils/dom.js @@ -33,6 +33,10 @@ export function fragmentToString(fragment) { div.appendChild(fragment); + if (!div.innerText.trim()) { + return ''; + } + return div.innerHTML; }