diff --git a/src/composables/useRole.js b/src/composables/useRole.js index e700b1f2e..e4e4f52c7 100644 --- a/src/composables/useRole.js +++ b/src/composables/useRole.js @@ -13,7 +13,7 @@ export function useRole() { name: data.user.name, nickname: data.user.nickname, lang: data.user.lang || 'es', - departmentFk: data.user.worker.department.departmentFk, + departmentFk: data.user?.worker?.department?.departmentFk, }; state.setUser(userData); state.setRoles(roles);