Skip to content

Commit

Permalink
fixing error when vis has no spy panel (elastic#9115)
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar authored Nov 21, 2016
1 parent f0a8887 commit 5ef7a52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ui/public/visualize/visualize.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ uiModules
$scope.spy.mode = ($scope.uiState) ? $scope.uiState.get('spy.mode', {}) : {};

let applyClassNames = function () {
let $visEl = getVisContainer();
const $visEl = getVisContainer();
const $spyEl = getSpyContainer();
if (!$spyEl) return;

let fullSpy = ($scope.spy.mode && ($scope.spy.mode.fill || $scope.fullScreenSpy));

$visEl.toggleClass('spy-only', Boolean(fullSpy));
Expand Down

0 comments on commit 5ef7a52

Please sign in to comment.