From 6cb707cc4fa391f0f64710cc223e514a9b05ac5f Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 7 Jul 2011 15:35:37 +0200 Subject: [PATCH] messageTray.js: raise an exception only if parseInt(count) returns NaN 0 is a valid value for count so we should accept it. https://bugzilla.gnome.org/show_bug.cgi?id=654139 --- js/ui/messageTray.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index a29dedebd..bd55a3133 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -941,7 +941,7 @@ Source.prototype = { }, _setCount: function(count, visible) { - if (!parseInt(count)) + if (isNaN(parseInt(count))) throw new Error("Invalid notification count: " + count); this._counterBin.visible = visible;