fix wrong logic when vote counter stays at zero (e.g. self-vote)
This commit is contained in:
parent
9dd066c6a6
commit
6006a12778
@ -157,12 +157,8 @@ define(["app/text/html", "app/dom", "app/utils", "app/config", "app/api", "app/m
|
|||||||
// update vote counter, but hide if votes sum to 0
|
// update vote counter, but hide if votes sum to 0
|
||||||
var votes = function(value) {
|
var votes = function(value) {
|
||||||
var span = $("span.votes", footer);
|
var span = $("span.votes", footer);
|
||||||
if (span === null) {
|
if (span === null && value === 0) {
|
||||||
if (value === 0) {
|
footer.prepend($.new("span.votes", value));
|
||||||
span.remove();
|
|
||||||
} else {
|
|
||||||
footer.prepend($.new("span.votes", value));
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (value === 0) {
|
if (value === 0) {
|
||||||
span.remove();
|
span.remove();
|
||||||
|
Loading…
Reference in New Issue
Block a user