From 61f15ba843ab3383a4e1667dcc4a30f343a0f8d0 Mon Sep 17 00:00:00 2001 From: Qi <474021214@qq.com> Date: Thu, 18 Aug 2022 20:04:03 +0800 Subject: [PATCH] Update libs/components/editor-core/src/editor/clipboard/utils.ts Co-authored-by: Whitewater --- libs/components/editor-core/src/editor/clipboard/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/components/editor-core/src/editor/clipboard/utils.ts b/libs/components/editor-core/src/editor/clipboard/utils.ts index f9ae879b5c..aedc28c22c 100644 --- a/libs/components/editor-core/src/editor/clipboard/utils.ts +++ b/libs/components/editor-core/src/editor/clipboard/utils.ts @@ -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);