There was an error while loading. Please reload this page.
1 parent 2e80990 commit 4d6e4fcCopy full SHA for 4d6e4fc
1 file changed
src/selection/message.ts
@@ -44,9 +44,9 @@ function findFrameBySource(source: MessageEventSource | null) {
44
}
45
46
const roots: Array<Document | ShadowRoot> = [document]
47
+ let root: Document | ShadowRoot | undefined
48
- while (roots.length) {
49
- const root = roots.pop()!
+ while ((root = roots.pop())) {
50
const walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT)
51
let element = walker.nextNode() as Element | null
52
0 commit comments