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
|
||||
var votes = function(value) {
|
||||
var span = $("span.votes", footer);
|
||||
if (span === null) {
|
||||
if (value === 0) {
|
||||
span.remove();
|
||||
} else {
|
||||
footer.prepend($.new("span.votes", value));
|
||||
}
|
||||
if (span === null && value === 0) {
|
||||
footer.prepend($.new("span.votes", value));
|
||||
} else {
|
||||
if (value === 0) {
|
||||
span.remove();
|
||||
|
Loading…
Reference in New Issue
Block a user