Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Nov 29, 2023
1 parent 1bfab7b commit 7d5785a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export function createHighlight(rect: DOMRect, icon?: Icon) {
export function getHighlightZIndex(el: Element) {
let highestZIndex = 0;
let current: Element | ParentNode | null = el;
while(current) {
let zIndex = Number(getComputedStyle(el).zIndex);
while(current instanceof Element) {
let zIndex = Number(getComputedStyle(current).zIndex);
if(!Number.isNaN(zIndex) && zIndex > highestZIndex) {
highestZIndex = zIndex;
}
Expand Down

0 comments on commit 7d5785a

Please sign in to comment.