mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-25 01:18:14 +00:00
fix issue-4499:- UI: do not throw error when team list is empty [] (#4524)
This commit is contained in:
parent
88cf0930e2
commit
e5a4cfd648
@ -224,7 +224,7 @@ const TeamsAndUsersPage = () => {
|
|||||||
getTeams(['users', 'owns', 'defaultRoles', 'owner'])
|
getTeams(['users', 'owns', 'defaultRoles', 'owner'])
|
||||||
.then((res: AxiosResponse) => {
|
.then((res: AxiosResponse) => {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
if (!teamAndUser) {
|
if (!teamAndUser && res.data.data > 0) {
|
||||||
getCurrentTeamUsers(res.data.data[0].name);
|
getCurrentTeamUsers(res.data.data[0].name);
|
||||||
setCurrentTeam(res.data.data[0]);
|
setCurrentTeam(res.data.data[0]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user