Skip to content
Snippets Groups Projects
Commit 81e80096 authored by Bartłomiej Górnicki's avatar Bartłomiej Górnicki
Browse files

Merge branch 'fix-downvotes-showing-as-upvotes' into 'develop'

fix: show downvotes properly

See merge request !125
parents d1212ab7 bd40c55e
No related branches found
No related tags found
2 merge requests!127Develop,!125fix: show downvotes properly
...@@ -506,8 +506,8 @@ class Voting extends React.Component { ...@@ -506,8 +506,8 @@ class Voting extends React.Component {
avotes.sort((a, b) => (abs(a.rshares) > abs(b.rshares) ? -1 : 1)); avotes.sort((a, b) => (abs(a.rshares) > abs(b.rshares) ? -1 : 1));
for (let v = 0; v < maxlen; ++v) { for (let v = 0; v < maxlen; ++v) {
const { rshares, voter } = avotes[v]; const { rshares, voter } = avotes[v];
if (rshares == '0') continue; if (rshares === 0) continue;
const sign = rshares[0] == '-' ? '- ' : '+ '; const sign = rshares < 0 ? '- ' : '+ ';
voters.push({ value: sign + voter, link: '/@' + voter }); voters.push({ value: sign + voter, link: '/@' + voter });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment