@@ -154,7 +154,7 @@ const ProductionStatistics = ({ data, cardSettings, reducerData }) => {
|
||||
const sortedStatistics = useMemo(() => {
|
||||
const statisticsMap = new Map(statistics.map((stat) => [stat.id, stat]));
|
||||
|
||||
return cardSettings.statisticsOrder.reduce((sorted, orderId) => {
|
||||
return (cardSettings?.statisticsOrder ? cardSettings.statisticsOrder : []).reduce((sorted, orderId) => {
|
||||
const value = statisticsMap.get(orderId);
|
||||
if (value && value.value !== null) {
|
||||
sorted.push(value);
|
||||
|
||||
Reference in New Issue
Block a user