fix: use replace when redirecting to new url

This commit is contained in:
Torkel Ödegaard 2018-01-31 17:26:35 +01:00
parent 57edf89033
commit 75cf9ae27d

View File

@ -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;