fix: use the original object if it is not a shell object

This commit is contained in:
LeoYuan 袁力皓 2022-05-27 10:47:40 +08:00
parent 3262e47b5f
commit 95755c0385

View File

@ -161,8 +161,8 @@ export default class DocumentModel {
copy?: boolean | undefined,
) {
const node = this[documentSymbol].insertNode(
parent[nodeSymbol] as any,
thing?.[nodeSymbol],
parent[nodeSymbol] ? parent[nodeSymbol] : parent,
thing?.[nodeSymbol] ? thing[nodeSymbol] : thing,
at,
copy,
);