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
This commit is contained in:
Guillaume Desmottes 2011-07-07 15:35:37 +02:00
parent 998c5f17fc
commit 6cb707cc4f

View File

@ -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;