Skip to content

Commit

Permalink
feat(router): 多路由配置 fix #9289
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakaryCode committed Dec 16, 2021
1 parent 757d819 commit 2bb526c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-router/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export function createRouter (
}

if (history.location.pathname === '/') {
history.replace(prependBasename((config.entryPagePath || routes[0].path) as string + history.location.search))
history.replace(prependBasename((config.entryPagePath || routes[0].path?.[0]) as string + history.location.search))
}

render({ location: history.location, action: LocationAction.Push })
Expand Down

0 comments on commit 2bb526c

Please sign in to comment.