Update libs/components/editor-core/src/editor/clipboard/utils.ts

Co-authored-by: Whitewater <me@waterwater.moe>
This commit is contained in:
Qi
2022-08-18 20:04:03 +08:00
committed by GitHub
parent b25016b893
commit 61f15ba843
@@ -26,7 +26,7 @@ export const getClipInfoOfBlockById = async (
properties: blockView.getSelProperties(block, {}),
children: [] as ClipBlockInfo[],
};
const children = await block?.children();
const children = await block?.children() ?? [];
for (let i = 0; i < children.length; i++) {
const childInfo = await getClipInfoOfBlockById(editor, children[i].id);