From 9ef98c4c01eb2716ac8d9603b0a604ca45c233f2 Mon Sep 17 00:00:00 2001 From: Denys Bohdan Date: Tue, 10 Dec 2024 11:45:52 +0100 Subject: [PATCH] UIIN-3161 Handle `null` `typeIds` in `browse/config/instance-classification` response (#2693) --- CHANGELOG.md | 4 ++++ src/components/BrowseResultsList/utils.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b440ce55e..379d3d335 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change history for ui-inventory +## [12.0.7] (IN PROGRESS) + +* Handle `null` `typeIds` in `browse/config/instance-classification` response. Fixes UIIN-3161. + ## [12.0.6](https://github.com/folio-org/ui-inventory/tree/v12.0.6) (2024-12-06) [Full Changelog](https://github.com/folio-org/ui-inventory/compare/v12.0.5...v12.0.6) diff --git a/src/components/BrowseResultsList/utils.js b/src/components/BrowseResultsList/utils.js index 7a3bce1bc..884853987 100644 --- a/src/components/BrowseResultsList/utils.js +++ b/src/components/BrowseResultsList/utils.js @@ -87,7 +87,7 @@ const getClassificationQuery = (qindex, data, row) => { .find(config => config.id === classificationBrowseConfigId)?.typeIds; const classificationBrowseTypesQuery = classificationBrowseTypes - .map(typeId => `classifications.classificationTypeId=="${typeId}"`) + ?.map(typeId => `classifications.classificationTypeId=="${typeId}"`) .join(' or '); if (classificationBrowseTypesQuery) {