Skip to content

Commit

Permalink
US157225 - Handle when styles are placed on the host that we want inc…
Browse files Browse the repository at this point in the history
…orporated
  • Loading branch information
svanherk committed Sep 5, 2023
1 parent e3814b8 commit 638a16e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/browser/vdiff.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function findTargets(elem) {
if (!elem.shadowRoot) return [elem];
const nestedTargets = elem.shadowRoot.querySelectorAll('.vdiff-target');
if (nestedTargets.length === 0) return [elem];
return Array.from(nestedTargets).reduce((acc, target) => [...acc, ...findTargets(target)], []);
return Array.from(nestedTargets).reduce((acc, target) => [...acc, ...findTargets(target)], [elem]);
}

function findLargestRect(elems) {
Expand Down

0 comments on commit 638a16e

Please sign in to comment.