We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6d376a commit 9aa66c8Copy full SHA for 9aa66c8
libs/engine/src/app/components/picker-highlighter.tsx
@@ -6,14 +6,12 @@ import { Highlighter } from './highlighter'
6
const DEFAULT_INACTIVE_BORDER_COLOR = '#384BFF4D' // light blue
7
const DEFAULT_CHILDREN_BORDER_STYLE = 'dashed'
8
9
-const getElementDepth = (el: Element | ShadowRoot | null | undefined) => {
+const getElementDepth = (el: Element | Node | ShadowRoot | null | undefined) => {
10
let depth = 0
11
-
12
while (el) {
13
depth++
14
- el = el instanceof ShadowRoot ? el.host : el.parentElement
+ el = el instanceof ShadowRoot ? el.host : el.parentNode
15
}
16
17
return depth
18
19
0 commit comments