Skip to content

Commit

Permalink
fix: US157225 - Handle when styles are placed on the host that we wan…
Browse files Browse the repository at this point in the history
…t incorporated in the rect calculation (#161)
  • Loading branch information
svanherk authored Sep 5, 2023
1 parent e3814b8 commit 96fea68
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 96fea68

Please sign in to comment.