From d8f8afcbd0afd234a9143cb30edafbd85a70ebe1 Mon Sep 17 00:00:00 2001 From: Moonlit Date: Fri, 26 Jan 2024 19:44:49 +0800 Subject: [PATCH] fix: Resolved the issue of duplicate display of supported file types during text file upload (#2241) Co-authored-by: hbc --- web/app/components/datasets/create/file-uploader/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/app/components/datasets/create/file-uploader/index.tsx b/web/app/components/datasets/create/file-uploader/index.tsx index 4e02a1fb92..3b8146a5d9 100644 --- a/web/app/components/datasets/create/file-uploader/index.tsx +++ b/web/app/components/datasets/create/file-uploader/index.tsx @@ -72,6 +72,8 @@ const FileUploader = ({ return item }) + res = res.map(item => item.toLowerCase()) + res = res.filter((item, index, self) => self.indexOf(item) === index) return res.map(item => item.toUpperCase()).join(language !== LanguagesSupportedUnderscore[1] ? ', ' : '、 ') })()