]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Prevent spare datasets from breaking MultiTooltips 413/head
authorNick Downie <hello@nickdownie.com>
Wed, 2 Jul 2014 20:09:04 +0000 (21:09 +0100)
committerNick Downie <hello@nickdownie.com>
Wed, 2 Jul 2014 20:09:04 +0000 (21:09 +0100)
src/Chart.Core.js

index fbec59c30722a5406a2b787b8a763d8410239029..0bd5da26877c6fe615821a97ee3017a74fc7ad04 100755 (executable)
                                                                yMin;
                                                        helpers.each(this.datasets, function(dataset){
                                                                dataCollection = dataset.points || dataset.bars || dataset.segments;
-                                                               Elements.push(dataCollection[dataIndex]);
+                                                               if (dataCollection[dataIndex]){
+                                                                       Elements.push(dataCollection[dataIndex]);
+                                                               }
                                                        });
 
                                                        helpers.each(Elements, function(element) {