Skip to content

Commit

Permalink
Reduce type check risk for computed dates
Browse files Browse the repository at this point in the history
  • Loading branch information
hvangeffen committed Feb 6, 2025
1 parent 55044ee commit 007b5e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/timeseries/TimeSeriesComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ const dates = computed(() => {
.map((chartSeries) => chartSeries.dataResources[0])
.map((resource) => series.value[resource])
.flatMap((series) => series?.data ?? [])
.flatMap((data) => (data.x as Date) ?? [])
.flatMap((data) => data.x ?? [])
.filter((date) => typeof date !== 'number')
return seriesDates
})
Expand Down

0 comments on commit 007b5e4

Please sign in to comment.