Преглед на файлове

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