Skip to content

Commit

Permalink
Merge pull request #779 from benptc/fix-follow-ui-while-loading
Browse files Browse the repository at this point in the history
hide UI that says X users are following you, until your avatar has finished initializing
  • Loading branch information
benptc authored Nov 1, 2024
2 parents 7c8dc5c + 75db3ae commit f73b578
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/avatar/iconMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ createNameSpace("realityEditor.avatar.iconMenu");
let myId = realityEditor.avatar.getMyAvatarId();
let usersFollowingMe = realityEditor.avatar.utils.getUsersFollowingUser(myId, connectedAvatars);

if (usersFollowingMe.length > 0) {
if (myId && usersFollowingMe.length > 0) {
let plural = usersFollowingMe.length > 1;
leaderContainer.textContent = `${usersFollowingMe.length} ${plural ? 'users are' : 'user is'} following your perspective. Click here to stop sharing.`;
leaderContainer.style.display = '';
Expand Down

0 comments on commit f73b578

Please sign in to comment.