perf[permission.js]: remove useless code (#3301)
This commit is contained in:
parent
c63755f4ca
commit
0d04d543a7
|
@ -13,11 +13,7 @@ export default function checkPermission(value) {
|
|||
const hasPermission = roles.some(role => {
|
||||
return permissionRoles.includes(role)
|
||||
})
|
||||
|
||||
if (!hasPermission) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
return hasPermission
|
||||
} else {
|
||||
console.error(`need roles! Like v-permission="['admin','editor']"`)
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue