Merge pull request #13286 from gavindsouza/router-fix

fix: Don't strip 'app' from doctype route names
This commit is contained in:
mergify[bot] 2021-05-25 10:31:12 +00:00 committed by GitHub
commit 1c5747bf71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -372,7 +372,8 @@ frappe.router = {
strip_prefix(route) {
if (route.substr(0, 1)=='/') route = route.substr(1); // for /app/sub
if (route.startsWith('app')) route = route.substr(4); // for desk/sub
if (route.startsWith('app/')) route = route.substr(4); // for desk/sub
if (route == 'app') route = route.substr(4); // for /app
if (route.substr(0, 1)=='/') route = route.substr(1);
if (route.substr(0, 1)=='#') route = route.substr(1);
if (route.substr(0, 1)=='!') route = route.substr(1);