From 2c4201ae1889dab95e3667b637b7e951d91cbcdf Mon Sep 17 00:00:00 2001 From: wanglinfang2014 Date: Tue, 9 May 2023 17:09:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E5=BA=94=E7=94=A8nav=E9=80=89=E4=B8=AD=E9=97=AE=E9=A2=98=20(#6?= =?UTF-8?q?835)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: wanglinfang --- packages/amis/src/renderers/Nav.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/amis/src/renderers/Nav.tsx b/packages/amis/src/renderers/Nav.tsx index e0cf97a9d..290df5fae 100644 --- a/packages/amis/src/renderers/Nav.tsx +++ b/packages/amis/src/renderers/Nav.tsx @@ -897,6 +897,7 @@ const ConditionBuilderWithRemoteOptions = withRemoteConfig({ evalExpression(link.activeOn as string, location) : !!( link.hasOwnProperty('to') && + link.to !== null && // 也可能出现{to: null}的情况(独立应用)filter会把null处理成'' 那默认首页会选中很多菜单项 {to: ''}认为是有效配置 env && env.isCurrentUrl(filter(link.to as string, data)) ));