Mouse out over legend should not cause errors on the console (#9274)

Backports PR #9263

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

* Original sha: e6880651ad
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-29T21:44:03Z
This commit is contained in:
jasper 2016-11-30 11:29:42 -05:00 committed by Court Ewing
parent 9b43bdc5d2
commit 59b31e5b3d

View file

@ -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);
};