浏览代码

fix: Don't strip 'app' from doctype route names

After creation of a new document and going back would break routes for doctypes that start with 'App'. In observed instance, it would clips the “app” portion in the appraisal and appraisal-template.
version-14
Gavin D'souza 4 年前
父节点
当前提交
ba7785eaa0
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      frappe/public/js/frappe/router.js

+ 2
- 1
frappe/public/js/frappe/router.js 查看文件

@@ -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);


正在加载...
取消
保存