diff --git a/src/dom/document-cloner.ts b/src/dom/document-cloner.ts index 6e97b35cd..69f248d4c 100644 --- a/src/dom/document-cloner.ts +++ b/src/dom/document-cloner.ts @@ -325,6 +325,11 @@ export class DocumentCloner { clone.style.transitionProperty = 'none'; const style = window.getComputedStyle(node); + + if (style.display === "none") { + return clone; + } + const styleBefore = window.getComputedStyle(node, ':before'); const styleAfter = window.getComputedStyle(node, ':after');