mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2025-02-17 01:12:20 +00:00
Fix for old gathers schema
This commit is contained in:
parent
ec853bedfd
commit
6290d1de38
1 changed files with 4 additions and 0 deletions
|
@ -945,6 +945,10 @@ var GatherVotingResults = React.createClass({
|
|||
countVotes(voteType) {
|
||||
return this.props.gather.gatherers.reduce((acc, gatherer) => {
|
||||
let votes = gatherer[voteType];
|
||||
|
||||
// Temporary fix because some mapvotes are ints and not arrays
|
||||
if (!Array.isArray(votes)) votes = [votes];
|
||||
|
||||
if (votes.length > 0) votes.forEach(vote => acc.push(vote));
|
||||
return acc;
|
||||
}, []);
|
||||
|
|
Loading…
Reference in a new issue