lanjianrong %!s(int64=5) %!d(string=hai) anos
pai
achega
fe564168c3
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/app.tsx

+ 2 - 1
src/app.tsx

@@ -58,7 +58,8 @@ export const layout = ({ initialState, setInitialState }) => {
       if (
         initialState?.currentUser?.staffId &&
         location.pathname !== loginPath &&
-        PERMISSION_NEED_PATH.includes(location.pathname)
+        PERMISSION_NEED_PATH.includes(location.pathname) &&
+        !initialState?.permData
       ) {
         const permData = await initialState.fetchPermData()
         permData && setInitialState({ ...initialState, permData })