Skip to content

Commit 314c5da

Browse files
authored
Merge pull request GoogleChromeLabs#55 from rontav/feature/firefox-fix
Fix: expected node to have parent
2 parents 4e70d5b + 18b8ccd commit 314c5da

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/engine.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,13 @@ export function initializePolyfill() {
187187
instance?.disconnect();
188188
}
189189

190+
if (
191+
entry.target.nodeType !== Node.DOCUMENT_NODE &&
192+
entry.target.nodeType !== Node.DOCUMENT_FRAGMENT_NODE &&
193+
entry.target.parentNode === null
194+
) {
195+
continue;
196+
}
190197
if (
191198
entry.type === 'attributes' &&
192199
entry.attributeName &&

0 commit comments

Comments
 (0)