From d63204603275bb8a0a1ee18d880f5e54490fb2c0 Mon Sep 17 00:00:00 2001 From: Tuan Le <30828528+tuankg1028@users.noreply.github.com> Date: Wed, 25 Jun 2025 14:36:54 +0700 Subject: [PATCH] Fixes typo in variable name (#8476) ### What problem does this PR solve? This PR fixes a typo in the variable name `succesfulFilenames`, correcting it to `successfulFilenames`. This ensures consistency and avoids potential errors due to the misspelled variable. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- .../pages/add-knowledge/components/knowledge-file/hooks.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/pages/add-knowledge/components/knowledge-file/hooks.ts b/web/src/pages/add-knowledge/components/knowledge-file/hooks.ts index 005a72e43..e7ac6f11b 100644 --- a/web/src/pages/add-knowledge/components/knowledge-file/hooks.ts +++ b/web/src/pages/add-knowledge/components/knowledge-file/hooks.ts @@ -175,7 +175,7 @@ export const useHandleUploadDocument = () => { const ret = await uploadDocument(filesPart); const files = ret?.data || []; - const succesfulFilenames = files.map((file: any) => file.name); + const successfulFilenames = files.map((file: any) => file.name); // set status to done or error on files (based on response) setFileList( @@ -185,7 +185,7 @@ export const useHandleUploadDocument = () => { } let newFile = file; - newFile.status = succesfulFilenames.includes(file.name) + newFile.status = successfulFilenames.includes(file.name) ? 'done' : 'error'; newFile.percent = 100; @@ -197,7 +197,7 @@ export const useHandleUploadDocument = () => { return { code: ret?.code, fileIds: files.map((file: any) => file.id), - totalSuccess: succesfulFilenames.length, + totalSuccess: successfulFilenames.length, }; }; const totalFiles = fileList.length;