mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: fixed redirect after save, fixes #10946
This commit is contained in:
@@ -77,8 +77,11 @@ export class DashboardSrv {
|
||||
postSave(clone, data) {
|
||||
this.dash.version = data.version;
|
||||
|
||||
if (data.url !== this.$location.path()) {
|
||||
this.$location.url(locationUtil.stripBaseFromUrl(data.url)).replace();
|
||||
const newUrl = locationUtil.stripBaseFromUrl(data.url);
|
||||
const currentPath = this.$location.path();
|
||||
|
||||
if (newUrl !== currentPath) {
|
||||
this.$location.url(newUrl).replace();
|
||||
}
|
||||
|
||||
this.$rootScope.appEvent('dashboard-saved', this.dash);
|
||||
|
||||
Reference in New Issue
Block a user