From 8236aba00a2e2b2a09420fea2c7aaa446f49c24c Mon Sep 17 00:00:00 2001 From: yinkaihui Date: Fri, 26 Apr 2024 17:18:08 +0800 Subject: [PATCH] fix: compatible isDirectory property --- components/Upload/trigger-node.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/Upload/trigger-node.tsx b/components/Upload/trigger-node.tsx index 129091d1e0..819940a04e 100644 --- a/components/Upload/trigger-node.tsx +++ b/components/Upload/trigger-node.tsx @@ -65,7 +65,9 @@ const TriggerNode = (props: PropsWithChildren) => { .reduce((result, item, index) => { if (item.webkitGetAsEntry) { const entry = item.webkitGetAsEntry(); - if (entry.isDirectory) { + + // https://github.com/arco-design/arco-design/issues/2643 + if (entry?.isDirectory) { return [...result, index]; } return result;