diff --git a/src/visits/charts/SortableBarChartCard.tsx b/src/visits/charts/SortableBarChartCard.tsx index 8d43bdb3..04ac4f33 100644 --- a/src/visits/charts/SortableBarChartCard.tsx +++ b/src/visits/charts/SortableBarChartCard.tsx @@ -37,7 +37,7 @@ export const SortableBarChartCard: FC = ({ const getSortedPairsForStats = (statsToSort: Stats, sorting: Record) => { const pairs = toPairs(statsToSort); const sortedPairs = !order.field ? pairs : sortBy( - pipe( + pipe( order.field === Object.keys(sorting)[0] ? pickKeyFromPair : pickValueFromPair, toLowerIfString, ),