Sfoglia il codice sorgente

fix: use replace when redirecting to new url

Torkel Ödegaard 8 anni fa
parent
commit
75cf9ae27d
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      public/app/routes/dashboard_loaders.ts

+ 1 - 1
public/app/routes/dashboard_loaders.ts

@@ -22,7 +22,7 @@ export class LoadDashboardCtrl {
     if (!($routeParams.type === 'script' || $routeParams.type === 'snapshot') && !$routeParams.uid) {
     if (!($routeParams.type === 'script' || $routeParams.type === 'snapshot') && !$routeParams.uid) {
       backendSrv.get(`/api/dashboards/db/${$routeParams.slug}`).then(res => {
       backendSrv.get(`/api/dashboards/db/${$routeParams.slug}`).then(res => {
         if (res) {
         if (res) {
-          $location.path(res.meta.url);
+          $location.path(res.meta.url).replace();
         }
         }
       });
       });
       return;
       return;