sforkowany z mirror/soapbox
Change vote results to display tied leading options as leading
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>draftjs
rodzic
2f5fff0222
commit
040dfe652a
|
@ -74,7 +74,7 @@ class Poll extends ImmutablePureComponent {
|
|||
const { poll, disabled, intl } = this.props;
|
||||
|
||||
const percent = poll.get('votes_count') === 0 ? 0 : (option.get('votes_count') / poll.get('votes_count')) * 100;
|
||||
const leading = poll.get('options').filterNot(other => other.get('title') === option.get('title')).every(other => option.get('votes_count') > other.get('votes_count'));
|
||||
const leading = poll.get('options').filterNot(other => other.get('title') === option.get('title')).every(other => option.get('votes_count') >= other.get('votes_count'));
|
||||
const active = !!this.state.selected[`${optionIndex}`];
|
||||
const voted = option.get('voted') || (poll.get('own_votes') && poll.get('own_votes').includes(optionIndex));
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue