Skip to content

Commit

Permalink
fix: 修改customRoutes配置路径缺失问题,补充转发情况
Browse files Browse the repository at this point in the history
  • Loading branch information
heweishui committed Apr 17, 2024
1 parent acdcec9 commit 285ba8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-router/src/api.ts
Expand Up @@ -64,7 +64,7 @@ async function navigate (option: Option | NavigateBackOption, method: MethodName
const state = { timestamp: Date.now() }
if (pathPieces.pathname) {
const originPath = routesAlias.getOrigin(pathPieces.pathname)
if (!RouterConfig.isPage(addLeadingSlash(originPath))) {
if (!RouterConfig.isPage(addLeadingSlash(originPath)) && !RouterConfig.isPage(addLeadingSlash(pathPieces.pathname))) {
const res = { errMsg: `${method}:fail page ${originPath} is not found` }
fail?.(res)
complete?.(res)
Expand Down

0 comments on commit 285ba8e

Please sign in to comment.