fix: use optional chaining for departmentFk in useRole composable
gitea/salix-front/pipeline/pr-test This commit is unstable
Details
gitea/salix-front/pipeline/pr-test This commit is unstable
Details
This commit is contained in:
parent
2992ac2d0d
commit
21c3384509
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue