fix: route to workspace when on "/app"

By default, when you visit "/app" it shows the workspace but the same is not reflected on the frappe.router.current_path so if the route is "/app" it will redirect to the route of that workspace.
This commit is contained in:
Maharshi Patel 2023-05-17 23:27:17 +05:30
parent ee521e217e
commit a69628de2d

View file

@ -248,9 +248,7 @@ frappe.views.Workspace = class Workspace {
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];
frappe.set_route(frappe.router.slug(page.public ? page.name : "private/" + page.name));
}
this.show_page(page);