Skip to content

Commit a73c6b1

Browse files
authored
Merge pull request #37 from cloudgraphdev/fix/CG-1084
fix: iamInstanceProfile never returning when there's a permission's e…
2 parents 391c28f + 63e6d4a commit a73c6b1

File tree

1 file changed

+9
-5
lines changed
  • src/services/iamInstanceProfile

1 file changed

+9
-5
lines changed

src/services/iamInstanceProfile/data.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,19 @@ export const listInstancesProfiles = async (
5656
})
5757
}
5858

59-
const { InstanceProfiles = [], IsTruncated, Marker } = data
59+
if (!isEmpty(data)) {
60+
const { InstanceProfiles = [], IsTruncated, Marker } = data
6061

61-
instanceProfileList.push(...InstanceProfiles)
62+
instanceProfileList.push(...InstanceProfiles)
6263

63-
if (IsTruncated) {
64-
listAllInstanceProfiles(Marker)
64+
if (IsTruncated) {
65+
listAllInstanceProfiles(Marker)
66+
}
67+
68+
resolve(instanceProfileList)
6569
}
6670

67-
resolve(instanceProfileList)
71+
resolve([])
6872
}
6973
)
7074
} catch (error) {

0 commit comments

Comments
 (0)