Merge pull request #130 from Zimmi48/master
bug fixed: was trying to remove an unexisting span.votes
This commit is contained in:
commit
b800a8bbe7
@ -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…
Reference in New Issue
Block a user