Skip to content

Commit

Permalink
Fix voting metrics to exclude 1/2 from isNumeric check
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenWeathers committed Oct 14, 2024
1 parent d0c1419 commit 9d091ae
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ui/src/components/poker/VotingMetrics.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
export let users = [];
export let averageRounding = 'ceil';
let chartData = [];
let maxCount = 0;
let consensusValue = '';
let consensusPercentage = 0;
let isNumeric = false;
Expand All @@ -21,7 +20,7 @@
return prev;
}, {});
isNumeric = pointValues
.filter(v => v !== '?' && v !== `☕️`)
.filter(v => v !== '1/2' && v !== '?' && v !== `☕️`)
.every(v => !isNaN(v));
chartData = pointValues.map(value => {
Expand All @@ -34,8 +33,6 @@
return { value, count, users };
});
maxCount = Math.max(...chartData.map(d => d.count));
const modeData = chartData.reduce((a, b) => (b.count > a.count ? b : a), {
count: 0,
});
Expand Down

0 comments on commit 9d091ae

Please sign in to comment.