Skip to content

Commit fffb1ce

Browse files
authored
fix: 修复首页白屏问题 (#18717)
1 parent eccc8aa commit fffb1ce

File tree

1 file changed

+2
-2
lines changed
  • packages/taro-router/src/router

1 file changed

+2
-2
lines changed

packages/taro-router/src/router/page.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ export default class PageHandler {
9090
return false
9191
}
9292
)?.[0] || routePath
93-
94-
return !!pagePath && this.tabBarList.some(t => stripTrailing(t.pagePath) === pagePath)
93+
// Fix: 这里仍然需要使用 addLeadingSlash 来处理 pagePath,因为 pagePath 可能在未被增加统一前缀 / 的时候就进行比对
94+
return !!pagePath && this.tabBarList.some(t => addLeadingSlash(stripTrailing(t.pagePath)) === pagePath)
9595
}
9696

9797
isDefaultNavigationStyle () {

0 commit comments

Comments
 (0)