From 83e99b143f6141fd5007b061cd8d6f217b079d95 Mon Sep 17 00:00:00 2001 From: tom Date: Mon, 9 Sep 2024 08:51:36 +0900 Subject: [PATCH] fix 4 defaultSelectedMeasure are selected when no defaultSelectedMeasures are given --- src/common/models/data-cube/data-cube.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/models/data-cube/data-cube.ts b/src/common/models/data-cube/data-cube.ts index ce71c858a..e4fca87a0 100644 --- a/src/common/models/data-cube/data-cube.ts +++ b/src/common/models/data-cube/data-cube.ts @@ -513,7 +513,7 @@ export function getDefaultSplits(dataCube: ClientDataCube): Splits { } export function getDefaultSeries(dataCube: ClientDataCube): SeriesList { - if (dataCube.defaultSelectedMeasures) { + if (dataCube.defaultSelectedMeasures.length > 0) { return SeriesList.fromMeasures(dataCube.defaultSelectedMeasures.map(name => findMeasureByName(dataCube.measures, name))); } const first4Measures = allMeasures(dataCube.measures).slice(0, 4);