bug fixed: was trying to remove an unexisting span.votes

pull/130/head
Théo Zimmermann 10 years ago
parent 74363d44ba
commit d0a0ac39b0

@ -155,8 +155,10 @@ define(["app/dom", "app/utils", "app/config", "app/api", "app/jade", "app/i18n",
// update vote counter, but hide if votes sum to 0
var votes = function (value) {
var span = $("span.votes", footer);
if (span === null && value !== 0) {
footer.prepend($.new("span.votes", value));
if (span === null) {
if (value !== 0) {
footer.prepend($.new("span.votes", value));
}
} else {
if (value === 0) {
span.remove();

Loading…
Cancel
Save