From b1f96a7ca7c37d9269b59d14b2cd67cc21db4d13 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 10 Mar 2021 20:26:53 -0500 Subject: Fix previousStyles being recreated for every transparent element (#1512) --- ext/js/dom/document-util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/js') diff --git a/ext/js/dom/document-util.js b/ext/js/dom/document-util.js index 393ef294..8284ffa5 100644 --- a/ext/js/dom/document-util.js +++ b/ext/js/dom/document-util.js @@ -578,7 +578,7 @@ class DocumentUtil { startContinerPre = startContainer; } - previousStyles = new Map(); + if (previousStyles === null) { previousStyles = new Map(); } i = this._disableTransparentElement(elements, i, previousStyles); if (i < 0) { return null; -- cgit v1.2.3