fix: use correct route (#33393)

This commit is contained in:
Soham Kulkarni 2025-07-20 13:30:41 +05:30 committed by GitHub
parent 996843f11b
commit fa7040fcbb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -194,7 +194,11 @@ frappe.ui.toolbar.Toolbar = class {
add_back_button() {
if (!frappe.is_mobile()) return;
this.navbar = $(".navbar-brand");
let list_view_route = `/app/${frappe.get_route()[1].toLowerCase()}`;
let doctype = frappe.get_route()[1];
let list_view_route = `/app/${frappe.router.convert_from_standard_route([
"list",
doctype,
])}`;
this.navbar.attr("href", list_view_route);
this.navbar.html("");
this.navbar.html(frappe.utils.icon("arrow-left", "md"));