From 285ba8e6356d82a2d8a5cc49a31aa23587631eef Mon Sep 17 00:00:00 2001 From: heweishui Date: Wed, 17 Apr 2024 10:31:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9customRoutes=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=B7=AF=E5=BE=84=E7=BC=BA=E5=A4=B1=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E8=A1=A5=E5=85=85=E8=BD=AC=E5=8F=91=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-router/src/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/taro-router/src/api.ts b/packages/taro-router/src/api.ts index 6ec4f2b44d5f..aff9190d8742 100644 --- a/packages/taro-router/src/api.ts +++ b/packages/taro-router/src/api.ts @@ -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)