From a4e5340a6605db261fd2a2af1ced272d94c760dc Mon Sep 17 00:00:00 2001 From: Edoardo Sabadelli Date: Wed, 8 May 2024 14:03:39 +0200 Subject: [PATCH] fix: avoid reading from undefined error (DHIS2-17334) (#2970) When using View as with filters applied. --- src/components/Item/VisualizationItem/Item.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Item/VisualizationItem/Item.js b/src/components/Item/VisualizationItem/Item.js index 5adc38890..93f30c97b 100644 --- a/src/components/Item/VisualizationItem/Item.js +++ b/src/components/Item/VisualizationItem/Item.js @@ -232,8 +232,9 @@ class Item extends Component { } case CHART: case VISUALIZATION: { - return item.visualization.type === - VIS_TYPE_OUTLIER_TABLE && + return item.type === VISUALIZATION && + item.visualization.type === + VIS_TYPE_OUTLIER_TABLE && Object.keys(itemFilters).some( (filter) => ![