From e04678f33c8c68fd773a82d28ab0756d286de537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 12 Nov 2015 12:01:44 +0100 Subject: [PATCH] feat(dasbboard): fix to issues when setting fullscreen/edit state for panel that have yet to get a scope --- public/app/features/dashboard/viewStateSrv.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/app/features/dashboard/viewStateSrv.js b/public/app/features/dashboard/viewStateSrv.js index 749aced2bf2..58403766a31 100644 --- a/public/app/features/dashboard/viewStateSrv.js +++ b/public/app/features/dashboard/viewStateSrv.js @@ -89,6 +89,11 @@ function (angular, _, $) { this.leaveFullscreen(false); } var panelScope = this.getPanelScope(this.state.panelId); + // panel could be about to be created/added and scope does + // not exist yet + if (!panelScope) { + return; + } this.enterFullscreen(panelScope); return; }