async await in getGroup
This commit is contained in:
parent
5594fabb6a
commit
a57e8d939f
1 changed files with 2 additions and 2 deletions
|
|
@ -358,9 +358,9 @@ export async function getGroup(query: string) {
|
|||
const dataMainGroup = await res.json();
|
||||
const fetchSubGroups = async (group: any) => {
|
||||
let fullSubGroup = await Promise.all(
|
||||
group.subGroups.map(async (subGroupsData: any) => {
|
||||
group.subGroups.map((subGroupsData: any) => {
|
||||
if (group.subGroupCount > 0) {
|
||||
return await fetchSubGroups(subGroupsData);
|
||||
return fetchSubGroups(subGroupsData);
|
||||
} else {
|
||||
return {
|
||||
id: subGroupsData.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue