Skip to content

Commit

Permalink
fix: getRelativePeriodsDetails
Browse files Browse the repository at this point in the history
  • Loading branch information
BRaimbault committed Dec 5, 2024
1 parent 501a5bf commit b50ecdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/PeriodDimension/utils/relativePeriods.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,15 @@ export const getRelativePeriodsDetails = () =>
.map((option) =>
option.getPeriods().map((period) => ({
id: period.id,
name: period.name,
offset: period.offset,
duration: period.duration,
type: option.id,
}))
)
.flat()
.reduce((acc, period) => {
acc[period.id] = period.name
acc[period.id] = period
return acc
}, {})

Expand Down

0 comments on commit b50ecdc

Please sign in to comment.