Update profile.js

This commit is contained in:
2025-05-03 19:04:01 +05:00
committed by GitHub
parent b5dc47c8a7
commit a0b2e40531

View File

@@ -29,8 +29,8 @@ async function getProfileFromAnixart(profileId, token = '') {
const rolesList = rolesResponse.data;
const userRoles = rolesList.find(entry => entry.id === Number(profileId));
if (userRoles && Array.isArray(userRoles.role)) {
profileData.profile.roles = userRoles.role;
if (userRoles && Array.isArray(userRoles.roles)) {
profileData.profile.roles = userRoles.roles;
}
} catch {
// Ошибку загрузки ролей игнорируем