We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vben Admin V5
具体问题是对 route 进行解构时 children 属性设定的默认值只会在 undefined 时生效,而 null 属于一个有效值。当 hideChildrenInMenu 为 false,resultChildren.length 就会出现如 issue 标题那样的错误。 解决方案: // 处理子菜单 const resultChildren = hideChildrenInMenu ? [] : (children as MenuRecordRaw[]) ?? [];
最新版本
The text was updated successfully, but these errors were encountered:
fixed #6117
Sorry, something went wrong.
No branches or pull requests
Version
Vben Admin V5
Describe the bug?
具体问题是对 route 进行解构时 children 属性设定的默认值只会在 undefined 时生效,而 null 属于一个有效值。当
hideChildrenInMenu 为 false,resultChildren.length 就会出现如 issue 标题那样的错误。
解决方案:
// 处理子菜单
const resultChildren = hideChildrenInMenu
? []
: (children as MenuRecordRaw[]) ?? [];
Reproduction
具体问题是对 route 进行解构时 children 属性设定的默认值只会在 undefined 时生效,而 null 属于一个有效值。当
hideChildrenInMenu 为 false,resultChildren.length 就会出现如 issue 标题那样的错误。
解决方案:
// 处理子菜单
const resultChildren = hideChildrenInMenu
? []
: (children as MenuRecordRaw[]) ?? [];
System Info
Relevant log output
Validations
The text was updated successfully, but these errors were encountered: