⚡ 增强权限判断逻辑
This commit is contained in:
parent
78a373a3c6
commit
80f4b931a4
|
|
@ -17,7 +17,7 @@ export function getAuthority(str) {
|
|||
}
|
||||
|
||||
export function setAuthority(authority) {
|
||||
const proAuthority = typeof authority === 'string' ? authority.split(',') : authority;
|
||||
const proAuthority = typeof authority === 'string' ? authority.split(',') : (typeof authority === 'undefined' ? null : authority);
|
||||
return localStorage.setItem('sword-authority', JSON.stringify(proAuthority));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user