Fix for issue #890 (#891)

This commit is contained in:
Dmytro Kozlovskyi
2026-04-01 12:00:00 +08:00
committed by GitHub
parent f567393b44
commit 1c50bdcd44

View File

@@ -270,7 +270,7 @@ export default class MutationBuffer {
// ensure shadowHost is a Node, or doc.contains will throw an error
const notInDoc =
!this.doc.contains(n) &&
(rootShadowHost === null || !this.doc.contains(rootShadowHost));
(!rootShadowHost || !this.doc.contains(rootShadowHost));
if (!n.parentNode || notInDoc) {
return;
}