Skip to content

Commit

Permalink
Mouse out over legend should not cause errors on the console (#9274)
Browse files Browse the repository at this point in the history
Backports PR #9263

**Commit 1:**
Mouse out over legend should not cause errors to the console

* Original sha: e688065
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-29T21:44:03Z
  • Loading branch information
elastic-jasper authored and epixa committed Nov 30, 2016
1 parent 9b43bdc commit 59b31e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ui/public/visualize/visualize_legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ uiModules.get('kibana')
$scope.unhighlight = function (event) {
let el = event.currentTarget;
let handler = $scope.renderbot.vislibVis.handler;
if (!handler) return;
//there is no guarantee that a Chart will set the unhighlight-function on its handler
if (!handler || typeof handler.unHighlight !== 'function') {
return;
}
handler.unHighlight.call(el, handler.el);
};

Expand Down

0 comments on commit 59b31e5

Please sign in to comment.