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