fix logic error
authorDan Vanderkam <danvk@google.com>
Fri, 22 Oct 2010 14:50:57 +0000 (10:50 -0400)
committerDan Vanderkam <danvk@google.com>
Fri, 22 Oct 2010 14:50:57 +0000 (10:50 -0400)
dygraph.js

index 6e9aac7..650d317 100644 (file)
@@ -2820,7 +2820,7 @@ Dygraph.prototype.visibility = function() {
  */
 Dygraph.prototype.setVisibility = function(num, value) {
   var x = this.visibility();
-  if (num < 0 && num >= x.length) {
+  if (num < 0 || num >= x.length) {
     this.warn("invalid series number in setVisibility: " + num);
   } else {
     x[num] = value;