Skip to content

Commit

Permalink
fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
davidye007 committed Feb 9, 2025
1 parent 1be22d7 commit 9e585a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions trails-viz-app/src/components/PartyCharacteristics.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@
</b-form-checkbox>
</div>
</div>
<!-- Include Total toggle -->
<!-- Show Total toggle -->
<div class="d-flex align-items-center mb-2">
<span class="controls-label mr-2">Include Total:</span>
<span class="controls-label mr-2">Show Total:</span>
<b-form-checkbox v-model="showTotal" class="mr-3">
Total
</b-form-checkbox>
Expand Down Expand Up @@ -354,7 +354,7 @@ export default {
};
data.forEach((item) => {
const { characteristic, value, year } = item;
const { characteristic, year, counts } = item;
if (year === "Total") {
if (!this.showTotal) return;
} else {
Expand All @@ -363,9 +363,9 @@ export default {
if (!result[characteristic][year]) {
result[characteristic][year] = {};
}
Object.keys(item.counts).forEach((cat) => {
Object.keys(counts).forEach((cat) => {
result[characteristic][year][cat] =
(result[characteristic][year][cat] || 0) + item.counts[cat];
(result[characteristic][year][cat] || 0) + counts[cat];
});
});
Expand Down

0 comments on commit 9e585a1

Please sign in to comment.