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 30267cb173
commit 5ea53f706b

View File

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