pls don't panic

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
Euclid Ye
2026-04-25 17:12:45 +08:00
parent 8ced3d1b8e
commit 35671d9dde

View File

@@ -710,6 +710,7 @@ impl Document {
self.root_removal_noted.set(false);
if let Some(dirty_root) = self.dirty_root.get() {
if dirty_root.is_connected() {
// There was an existing dirty root so we mark its
// ancestors as dirty until the document element.
for ancestor in dirty_root
@@ -721,6 +722,7 @@ impl Document {
}
}
}
}
self.dirty_root.set(Some(&document_element));
return;
},