소스 검색

bugfix: auto reload Authorized (#5448)

ref #5416
huishan 6 년 전
부모
커밋
5421488dfc
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/utils/authority.ts

+ 1 - 1
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));
 }