From 915c66720c63afc204808b5e47138c6722bad2e4 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Tue, 19 Sep 2023 17:10:46 +0200 Subject: [PATCH] :bug: Forgot anchor condition --- .../Components/Layouts/Folder/FolderInformation/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx index f58687e3..d97cf1bd 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx @@ -224,7 +224,10 @@ class FolderInformationClass extends BasePage { private everyDocumentValidated(): boolean { if (!this.state.selectedFolder?.documents) return false; - return this.state.selectedFolder?.documents.every((document) => document.document_status === EDocumentStatus.VALIDATED); + return ( + this.state.selectedFolder?.documents?.length >= 1 && + this.state.selectedFolder?.documents.every((document) => document.document_status === EDocumentStatus.VALIDATED) + ); } private async deleteFolder() {