- {picture && hasTeams && team.id().length > 0 ? (
+ {picture && hasTeams && team.id()?.length > 0 ? (
{
- if (as.length > 1) {
+ if (as?.length > 1) {
user.settings.useTeam = false;
dispatch({ key: "as", value: "" });
userAPI.updateUser(user.id(), user.protobuf()).then(_resp => {
@@ -252,13 +252,13 @@ export default function UserMenu() {
});
}
}}
- disabled={user.settings.defaultTeam.length < 1}
+ disabled={user.settings.defaultTeam?.length < 1}
aria-label="Open Team Menu"
dense>
1}
+ disabled={user.settings.defaultTeam?.length < 1}
+ checked={as?.length > 1}
style={{ margin: 0, padding: 0 }}
/>