mirror of
https://github.com/directus/directus.git
synced 2026-01-30 00:37:55 -05:00
Fix roles in users module navigation not updating (#11501)
This commit is contained in:
@@ -14,7 +14,7 @@ export default function useNavigation(): { roles: Ref<Role[] | null>; loading: R
|
||||
loading = ref(false);
|
||||
}
|
||||
|
||||
if (roles.value === null && loading?.value === false) {
|
||||
if (loading?.value === false) {
|
||||
fetchRoles();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export default function useNavigation(): { roles: Ref<Role[] | null>; loading: R
|
||||
|
||||
async function fetchRoles() {
|
||||
if (!loading || !roles) return;
|
||||
loading.value = true;
|
||||
if (!roles.value) loading.value = true;
|
||||
|
||||
const rolesResponse = await api.get(`/roles`, {
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user