Merge pull request #20971 from shariquerik/maintain-frappe-current-route

fix: maintain frappe.router.current_router
This commit is contained in:
Shariq Ansari 2023-05-12 12:59:20 +05:30 committed by GitHub
commit ea20cdd4d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -247,6 +247,12 @@ frappe.views.Workspace = class Workspace {
this.update_selected_sidebar(this.current_page, false); //remove selected from old page
this.update_selected_sidebar(page, true); //add selected on new page
if (!frappe.router.current_route[0]) {
frappe.router.current_route = !page.public
? ["Workspaces", "private", page.name]
: ["Workspaces", page.name];
}
this.show_page(page);
}