From 9a8cd1dd24921fe788b91801d9fec633a04cdb7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A1=97=E8=A7=92=E5=B0=8F=E6=9E=97?= <1013335014@qq.com> Date: Fri, 23 Feb 2024 15:06:07 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E6=9F=90=E4=BA=9B=E6=97=A7=E7=89=88xmind=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=97=B6=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/src/parse/xmind.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simple-mind-map/src/parse/xmind.js b/simple-mind-map/src/parse/xmind.js index c2a2db76..294e8ded 100644 --- a/simple-mind-map/src/parse/xmind.js +++ b/simple-mind-map/src/parse/xmind.js @@ -198,7 +198,7 @@ const transformOldXmind = content => { childrenItem.elements.length > 0 ) { const children = getElementsByType(childrenItem.elements, 'attached') - children.forEach((item, index) => { + ;(children || []).forEach((item, index) => { const newChild = {} newNode.children.push(newChild) if (childrenSummary[index]) {