bug fixed: was trying to remove an unexisting span.votes
This commit is contained in:
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) {
|
||||
if (span === null) {
|
||||
if (value !== 0) {
|
||||
footer.prepend($.new("span.votes", value));
|
||||
}
|
||||
} else {
|
||||
if (value === 0) {
|
||||
span.remove();
|
||||
|
Loading…
Reference in New Issue
Block a user