Skip to content

Commit

Permalink
Merge pull request NervJS#15521 from heweishui/main
Browse files Browse the repository at this point in the history
fix: 修改 customRoutes 配置路径跳转页面缺失场景,补充转发情况
  • Loading branch information
koppthe authored Apr 20, 2024
2 parents 7b4b7d5 + 9274a57 commit 4c79d5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-router/src/api.ts
Original file line number Diff line number Diff line change
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 4c79d5c

Please sign in to comment.