Explorar o código

feat(dasbboard): fix to issues when setting fullscreen/edit state for panel that have yet to get a scope

Torkel Ödegaard %!s(int64=10) %!d(string=hai) anos
pai
achega
e04678f33c
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      public/app/features/dashboard/viewStateSrv.js

+ 5 - 0
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;
       }