We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12a682e commit 9566f6eCopy full SHA for 9566f6e
portal-ui/src/screens/Console/Groups/Groups.tsx
@@ -137,8 +137,16 @@ const Groups = ({ classes }: IGroupsProps) => {
137
api
138
.invoke("GET", `/api/v1/groups?offset=${offset}&limit=${rowsPerPage}`)
139
.then((res: GroupsList) => {
140
- setRecords(res.groups.sort(groupsSort));
141
- setTotalRecords(res.total);
+ let resGroups: string[] = [];
+ if (res.groups !== null) {
142
+ resGroups = res.groups.sort(groupsSort);
143
+ }
144
+ setRecords(resGroups);
145
+ let total = 0;
146
+ if (res.total !== null) {
147
+ total = res.total;
148
149
+ setTotalRecords(total);
150
setError("");
151
isLoading(false);
152
0 commit comments