Skip to content

Commit

Permalink
Fix pie charts not loading for traffic stops tab (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
Afani97 authored Feb 21, 2024
1 parent 63960df commit 26b6c94
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function TrafficStops(props) {
}, []);

const buildPercentages = (data, ds) => {
if (!data.length) return [0, 0, 0, 0, 0, 0];
if (!data.hasOwnProperty(ds)) return [0, 0, 0, 0, 0, 0];
const dsTotal = data[ds].datasets
.map((s) => s.data.reduce((a, b) => a + b, 0))
.reduce((a, b) => a + b, 0);
Expand Down

0 comments on commit 26b6c94

Please sign in to comment.