Преглед изворни кода

Merge pull request #12529 from resilient-tech/fix-router

fix(router): navigating forward not working for routes in frappe.re_route
version-14
mergify[bot] пре 4 година
committed by GitHub
родитељ
комит
2e20158753
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 измењених фајлова са 5 додато и 4 уклоњено
  1. +5
    -4
      frappe/public/js/frappe/router.js

+ 5
- 4
frappe/public/js/frappe/router.js Прегледај датотеку

@@ -101,6 +101,7 @@ frappe.router = {
let sub_path = this.get_sub_path();
if (this.re_route(sub_path)) return;

this.current_sub_path = sub_path;
this.current_route = this.parse();
this.set_history(sub_path);
this.render();
@@ -223,14 +224,14 @@ frappe.router = {
// it doesn't allow us to go back to the one prior to "new-doctype-1"
// Hence if this check is true, instead of changing location hash,
// we just do a back to go to the doc previous to the "new-doctype-1"
var re_route_val = this.get_sub_path(frappe.re_route[sub_path]);
if (decodeURIComponent(re_route_val) !== decodeURIComponent(sub_path)) {
const re_route_val = this.get_sub_path(frappe.re_route[sub_path]);
if (re_route_val === this.current_sub_path) {
window.history.back();
return true;
} else {
frappe.set_route(re_route_val);
return true;
}

return true;
}
},



Loading…
Откажи
Сачувај