File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -649,14 +649,14 @@ export class UserRepository {
649649 * Update a local user from the backend by ID.
650650 */
651651 updateUserById = async ( userId : string | QualifiedId ) : Promise < void > => {
652- const localUserEntity = this . findUserById ( userId ) || new User ( '' , null ) ;
652+ const localUserEntity = this . findUserById ( userId ) || new User ( '' , '' ) ;
653653 const updatedUserData = await this . userService . getUser ( userId ) ;
654654 const updatedUserEntity = this . userMapper . updateUserFromObject ( localUserEntity , updatedUserData ) ;
655655 if ( this . userState . isTeam ( ) ) {
656656 this . mapGuestStatus ( [ updatedUserEntity ] ) ;
657657 }
658- if ( updatedUserEntity . inTeam ( ) && updatedUserEntity . isDeleted ) {
659- amplify . publish ( WebAppEvents . TEAM . MEMBER_LEAVE , updatedUserEntity . teamId , updatedUserEntity . id ) ;
658+ if ( updatedUserEntity && updatedUserEntity . inTeam ( ) && updatedUserEntity . isDeleted ) {
659+ amplify . publish ( WebAppEvents . TEAM . MEMBER_LEAVE , updatedUserEntity . teamId , updatedUserEntity . qualifiedId ) ;
660660 }
661661 } ;
662662
You can’t perform that action at this time.
0 commit comments