diff --git a/src/services/useTimeSeries/index.ts b/src/services/useTimeSeries/index.ts index a5dd6a70f..81db77244 100644 --- a/src/services/useTimeSeries/index.ts +++ b/src/services/useTimeSeries/index.ts @@ -118,7 +118,10 @@ export function useTimeSeries( if (piSeries.timeSeries !== undefined) for (const index in piSeries.timeSeries) { const timeSeries = piSeries.timeSeries[index] - const resourceId = `${request.key}[${index}]` + const resourceId = + piSeries.timeSeries.length > 1 + ? `${request.key}[${index}]` + : request.key ?? '' updatedSeriesIds.push(resourceId) if (timeSeries.events === undefined) continue const resource = new SeriesUrlRequest('fews-pi', 'dummyUrl')