Explorar o código

fix redirect to panel when using an outdated dashboard slug (#12901)

Marcus Efraimsson %!s(int64=7) %!d(string=hai) anos
pai
achega
39669e5002
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      public/app/routes/dashboard_loaders.ts

+ 2 - 0
public/app/routes/dashboard_loaders.ts

@@ -34,7 +34,9 @@ export class LoadDashboardCtrl {
         const url = locationUtil.stripBaseFromUrl(result.meta.url);
 
         if (url !== $location.path()) {
+          // replace url to not create additional history items and then return so that initDashboard below isn't executed multiple times.
           $location.path(url).replace();
+          return;
         }
       }