Skip to content

Commit cb1ee75

Browse files
fix: check against invalid year in fixed periods (#1821)
Fixes unhappy cypress test in Line Listing app.
1 parent 29a9c7c commit cb1ee75

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/components/PeriodDimension/PeriodTransfer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ const PeriodTransfer = ({
216216
)
217217
return opt?.getPeriods() || []
218218
} else {
219+
if (!/\d{4}/.test(fixedFilter.year)) {
220+
return []
221+
}
219222
const opt = filteredFixedOptions.find(
220223
(o) => o.id === effectiveFixedFilterType
221224
)

0 commit comments

Comments
 (0)