Skip to content

Commit

Permalink
fix: empty string if currentFilterOption is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
paolapog committed Jul 26, 2023
1 parent fb333cf commit e969a09
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ export const MRT_TableHeadCellFilterLabel = <
.replace('{column}', String(columnDef.header))
.replace(
'{filterType}',
// @ts-ignore
localization[
`filter${
currentFilterOption?.charAt(0)?.toUpperCase() +
currentFilterOption?.slice(1)
}`
],
currentFilterOption
? // @ts-ignore
localization[
`filter${
currentFilterOption.charAt(0)?.toUpperCase() +
currentFilterOption.slice(1)
}`
]
: '',
)
.replace(
'{filterValue}',
Expand Down

0 comments on commit e969a09

Please sign in to comment.