fix wrong logic when vote counter stays at zero (e.g. self-vote)

pull/50/merge
Martin Zimmermann 11 years ago
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…
Cancel
Save