From d0a0ac39b0234d565d81d38022db88d0a50d8018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Zimmermann?= Date: Fri, 17 Oct 2014 09:24:53 +0200 Subject: [PATCH] bug fixed: was trying to remove an unexisting span.votes --- isso/js/app/isso.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/isso/js/app/isso.js b/isso/js/app/isso.js index ec97d63..8085cfd 100644 --- a/isso/js/app/isso.js +++ b/isso/js/app/isso.js @@ -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();