提交 a58e55b9 编写于 作者: D DCloud_LXH

fix: 路由跳转导致无限嵌套

上级 98d65b65
......@@ -130,7 +130,7 @@ export default ({ fullPath, path, hash }) => {
const routerMapKeys = Object.keys(routerMap)
let returnPathConfig = null
routerMapKeys.forEach(key => {
if (path.indexOf(key) === 0) {
if (path.indexOf(key) === 0 && routerMap[key].indexOf(key) !== 0 && routerMap[key] !== path) {
return returnPathConfig = {
path: path.replace(key, routerMap[key]),
hash,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册