diff --git a/src/utils/authority.ts b/src/utils/authority.ts index ffa91788..fbb50193 100644 --- a/src/utils/authority.ts +++ b/src/utils/authority.ts @@ -27,7 +27,7 @@ export function getAuthority(str?: string): string | string[] { export function setAuthority(authority: string | string[]): void { const proAuthority = typeof authority === 'string' ? [authority] : authority; + localStorage.setItem('antd-pro-authority', JSON.stringify(proAuthority)); // auto reload reloadAuthorized(); - return localStorage.setItem('antd-pro-authority', JSON.stringify(proAuthority)); }