fix issue-4499:- UI: do not throw error when team list is empty [] (#4524)

This commit is contained in:
Shailesh Parmar 2022-04-27 16:06:29 +05:30 committed by GitHub
parent 88cf0930e2
commit e5a4cfd648
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,7 +224,7 @@ const TeamsAndUsersPage = () => {
getTeams(['users', 'owns', 'defaultRoles', 'owner'])
.then((res: AxiosResponse) => {
if (res.data) {
if (!teamAndUser) {
if (!teamAndUser && res.data.data > 0) {
getCurrentTeamUsers(res.data.data[0].name);
setCurrentTeam(res.data.data[0]);
}