From ebe7bae546d068da121d57ad5fc13014a9096712 Mon Sep 17 00:00:00 2001 From: Tomasz Subik Date: Thu, 9 Jan 2025 15:49:49 +0100 Subject: [PATCH] fix grouping by fmu name --- .../operators-detail/documentation/documents-by-operator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/operators-detail/documentation/documents-by-operator.js b/components/operators-detail/documentation/documents-by-operator.js index 5724dccb..4964cb7f 100644 --- a/components/operators-detail/documentation/documents-by-operator.js +++ b/components/operators-detail/documentation/documents-by-operator.js @@ -62,7 +62,7 @@ function DocumentsByOperator({ groupedByCategory, searchText, user, id, intl, .. const FMUDocs = searchDocuments(groupedByCategory[category].filter( (doc) => doc.type === 'operator-document-fmu-histories' )); - const FMUDocsByFMU = groupBy(sortBy(FMUDocs, 'fmu.name'), 'fmu.name'); + const FMUDocsByFMU = groupBy(sortBy(FMUDocs, 'fmu.name'), (d) => d.fmu?.name); const isCategoryOpen = categoriesOpen[category] || searchText?.length > 0; return {