From 08251425ca0b58cb7f13f18bb1d71bf2ca241a94 Mon Sep 17 00:00:00 2001 From: Johannes Schill Date: Tue, 6 Nov 2018 16:55:44 +0100 Subject: [PATCH] wip: panel-header: Fix shareModal compatibility with react and angular --- public/app/features/dashboard/shareModalCtrl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/dashboard/shareModalCtrl.ts b/public/app/features/dashboard/shareModalCtrl.ts index f894d24202f..b4ce25485b8 100644 --- a/public/app/features/dashboard/shareModalCtrl.ts +++ b/public/app/features/dashboard/shareModalCtrl.ts @@ -12,8 +12,8 @@ export function ShareModalCtrl($scope, $rootScope, $location, $timeout, timeSrv, $scope.editor = { index: $scope.tabIndex || 0 }; $scope.init = () => { - $scope.panel = $scope.model.panel || $scope.panel; // React pass panel and dashboard in the "model" property - $scope.dashboard = $scope.model.dashboard || $scope.dashboard; + $scope.panel = $scope.model && $scope.model.panel ? $scope.model.panel : $scope.panel; // React pass panel and dashboard in the "model" property + $scope.dashboard = $scope.model && $scope.model.dashboard ? $scope.model.dashboard : $scope.dashboard; // ^ $scope.modeSharePanel = $scope.panel ? true : false; $scope.tabs = [{ title: 'Link', src: 'shareLink.html' }];