Optimize router
This commit is contained in:
@@ -22,7 +22,9 @@ export const getAuthRoute = (
|
|||||||
return route
|
return route
|
||||||
.filter(
|
.filter(
|
||||||
(value) =>
|
(value) =>
|
||||||
!(value.permission || parentPermission) || hasPathPermission(value.absolutePath)
|
value.path === '*' ||
|
||||||
|
!(value.permission || parentPermission) ||
|
||||||
|
hasPathPermission(value.absolutePath)
|
||||||
)
|
)
|
||||||
.map((value) => {
|
.map((value) => {
|
||||||
if (value.children) {
|
if (value.children) {
|
||||||
|
|||||||
Reference in New Issue
Block a user