Fix variable names.
Signed-off-by: Aramis Sennyey <sennyeya@amazon.com>
This commit is contained in:
committed by
Fredrik Adelöw
parent
77d3d93c7e
commit
b39b897a7b
@@ -93,7 +93,7 @@ export const EntityOwnerPicker = () => {
|
||||
.filter(Boolean) as string[],
|
||||
),
|
||||
];
|
||||
const { items } = await catalogApi.getEntitiesByRefs({
|
||||
const { items: ownerEntitiesOrNull } = await catalogApi.getEntitiesByRefs({
|
||||
entityRefs: ownerEntityRefs,
|
||||
fields: [
|
||||
'kind',
|
||||
@@ -103,8 +103,7 @@ export const EntityOwnerPicker = () => {
|
||||
'spec.profile.displayName',
|
||||
],
|
||||
});
|
||||
const owners = ownerEntityRefs.map((ref, index) => {
|
||||
const entity = items[index];
|
||||
const owners = ownerEntitiesOrNull.map((entity, index) => {
|
||||
if (entity) {
|
||||
return {
|
||||
label: humanizeEntity(entity, { defaultKind: 'Group' }),
|
||||
@@ -113,10 +112,10 @@ export const EntityOwnerPicker = () => {
|
||||
}
|
||||
return {
|
||||
label: humanizeEntityRef(
|
||||
parseEntityRef(ref, { defaultKind: 'Group' }),
|
||||
parseEntityRef(ownerEntityRefs[index], { defaultKind: 'Group' }),
|
||||
{ defaultKind: 'group' },
|
||||
),
|
||||
entityRef: ref,
|
||||
entityRef: ownerEntityRefs[index],
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user