Skip to content

Commit 0af85fb

Browse files
committed
Fix existing bug: onRemoveFile incorrect index check - files are now properly removed, not just shown to be removed in the UI for FilePond
1 parent bb5b275 commit 0af85fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

services/common/src/components/project/envApplication/EnvDocumentsTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ const EnvDocumentsTab = () => {
110110
const onRemoveFile = (_error, file) => {
111111
const document_manager_guid = file?.serverId;
112112
const docIndex = formValues.documents.findIndex((d) => d.document_manager_guid === document_manager_guid);
113-
if (docIndex) {
113+
if (docIndex !== -1) {
114114
dispatch(arrayRemove(formName, "documents", docIndex));
115115
}
116116
};

0 commit comments

Comments
 (0)