Browse files

fix #88 Do not access element if it does not exist

  • Loading branch information...
1 parent 5277507 commit a0a7330c944f0c80907794b36ca8105d2dfee414 @bjornd committed Oct 1, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/data-series.js
View
4 lib/data-series.js
@@ -43,7 +43,9 @@ jvm.DataSeries.prototype = {
code;
if (typeof key == 'string') {
- this.elements[key].setStyle(this.params.attribute, attr);
+ if (this.elements[key]) {
+ this.elements[key].setStyle(this.params.attribute, attr);
+ }
} else {
for (code in attrs) {
if (this.elements[code]) {

0 comments on commit a0a7330

Please sign in to comment.