From a06f614f5287e9e84a5b9589d3919095ff56a95b Mon Sep 17 00:00:00 2001 From: Bartosz Prusinowski Date: Thu, 19 Oct 2023 11:55:59 +0200 Subject: [PATCH] fix: Also consider rest of the sh:or when retrieving min or max values --- app/rdf/queries.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/rdf/queries.ts b/app/rdf/queries.ts index 33f510be0..c5ed0ace9 100644 --- a/app/rdf/queries.ts +++ b/app/rdf/queries.ts @@ -232,16 +232,18 @@ export const getCubeDimensionValues = async ({ ]; } - const firstPointer = dimension.out(ns.sh.or).out(ns.rdf.first); - const firstMin = firstPointer.out(ns.sh.minInclusive); - const firstMax = firstPointer.out(ns.sh.maxInclusive); + const listPointer = dimension + .out(ns.sh.or) + .out([ns.rdf.first, ns.rdf.rest]); + const listMin = listPointer.out(ns.sh.minInclusive); + const listMax = listPointer.out(ns.sh.maxInclusive); if ( - typeof firstMin.value !== "undefined" && - typeof firstMax.value !== "undefined" + typeof listMin.value !== "undefined" && + typeof listMax.value !== "undefined" ) { - const min = +firstMin.value; - const max = +firstMax.value; + const min = +listMin.value; + const max = +listMax.value; return [ { value: min, label: `${min}` },