Skip to content

Commit

Permalink
fix: truthy filter check correction (#538)
Browse files Browse the repository at this point in the history
  • Loading branch information
markuczy authored Oct 11, 2024
1 parent be7f6ad commit 996de4e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ export class DataSortBase {
case FilterType.EQUAL:
return value === filter.value
case FilterType.TRUTHY: {
const isTruthy = value !== undefined && value !== ''
return filter.value ? isTruthy : !isTruthy
return filter.value ? !!value : !value
}
}
})
Expand Down

0 comments on commit 996de4e

Please sign in to comment.