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:
parent
998c5f17fc
commit
6cb707cc4f
@ -941,7 +941,7 @@ Source.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_setCount: function(count, visible) {
|
_setCount: function(count, visible) {
|
||||||
if (!parseInt(count))
|
if (isNaN(parseInt(count)))
|
||||||
throw new Error("Invalid notification count: " + count);
|
throw new Error("Invalid notification count: " + count);
|
||||||
|
|
||||||
this._counterBin.visible = visible;
|
this._counterBin.visible = visible;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user