Skip to content

Commit

Permalink
Visualizations without spy panels causing error messages (elastic#9160)
Browse files Browse the repository at this point in the history
Backports PR elastic#9115

**Commit 1:**
fixing error when vis has no spy panel

* Original sha: c47f849
* Authored by ppisljar <[email protected]> on 2016-11-17T11:39:29Z

Former-commit-id: 567d636
  • Loading branch information
elastic-jasper authored and ppisljar committed Nov 21, 2016
1 parent 98278d4 commit 27d73c9
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 27d73c9

Please sign in to comment.