Skip to content

Commit

Permalink
Fatal error fix in hotfix code of 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aks30 committed Nov 17, 2022
1 parent 5c3cc5c commit be5ab6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/observations/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2266,14 +2266,14 @@ function _updateUserProfileBasedOnUserRoleInfo(userProfile, userRoleInformation)
if(currentProfileUserType.subType && currentProfileUserType.subType !== null) { // If the role has a subType

// Check if subType exists in userRoleInformation role, if not means profile data is old and should be reset.
if(!observation.userRoleInformation.role.toUpperCase().includes(currentProfileUserType.subType.toUpperCase())) {
if(!userRoleInformation.role.toUpperCase().includes(currentProfileUserType.subType.toUpperCase())) {
resetCurrentUserProfileRoles = true; // Reset userProfile.profileUserTypes
break;
}
} else { // If the role subType is null or is not there

// Check if type exists in userRoleInformation role, if not means profile data is old and should be reset.
if(!observation.userRoleInformation.role.toUpperCase().includes(currentProfileUserType.type.toUpperCase())) {
if(!userRoleInformation.role.toUpperCase().includes(currentProfileUserType.type.toUpperCase())) {
resetCurrentUserProfileRoles = true; // Reset userProfile.profileUserTypes
break;
}
Expand Down

0 comments on commit be5ab6c

Please sign in to comment.