close before open to make sure document was closed

This commit is contained in:
Yanzhen Yu
2018-12-21 22:32:01 +08:00
parent abaa5d935c
commit 6a910d3eaa

View File

@@ -112,6 +112,8 @@ export function buildNodeWithSN(
} }
// use target document as root document // use target document as root document
if (n.type === NodeType.Document) { if (n.type === NodeType.Document) {
// close before open to make sure document was closed
doc.close();
doc.open(); doc.open();
node = doc; node = doc;
} }