File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,8 @@ Legend.prototype.select = function (e) {
120
120
var point = highlightSeries ? points . find ( function ( p ) {
121
121
return p . name === highlightSeries ;
122
122
} ) : points [ 0 ] ;
123
+ // guard against missing point
124
+ if ( ! point ) return ;
123
125
// determine floating [left, top] coordinates of the legend div
124
126
// within the plotter_ area
125
127
// offset 50 px to the right and down from the first selection point
Original file line number Diff line number Diff line change @@ -113,6 +113,8 @@ Legend.prototype.select = function(e) {
113
113
var point = highlightSeries
114
114
? points . find ( p => p . name === highlightSeries )
115
115
: points [ 0 ]
116
+ // guard against missing point
117
+ if ( ! point ) return ;
116
118
// determine floating [left, top] coordinates of the legend div
117
119
// within the plotter_ area
118
120
// offset 50 px to the right and down from the first selection point
You can’t perform that action at this time.
0 commit comments