diff --git a/src/front/Components/DesignSystem/UserFolder/index.tsx b/src/front/Components/DesignSystem/UserFolder/index.tsx index ec45279b..2abe3b37 100644 --- a/src/front/Components/DesignSystem/UserFolder/index.tsx +++ b/src/front/Components/DesignSystem/UserFolder/index.tsx @@ -140,7 +140,10 @@ export default class UserFolder extends React.Component { if (!this.props.customer.documents) return 0; const totalDocuments: number = this.props.customer.documents.length; const numberDocumentsAsked: number = this.getDocumentsByStatus(EDocumentStatus.ASKED)?.length || 0; - return Math.round(((totalDocuments - numberDocumentsAsked) / totalDocuments) * 100); + + const percentage = Math.round(((totalDocuments - numberDocumentsAsked) / totalDocuments) * 100); + if(!percentage) return 0; + return percentage; } private getDocumentsByStatus(status: string): Document[] | null {