1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix not showing some non-core kinds

- Specifically if a Kind is not present within the preferredVersion of
  a group then we don't know that resource exists

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-03-07 08:12:06 -05:00
parent aee3c38e7e
commit 9836b0c44b

View File

@ -20,10 +20,10 @@ const requestNonCoreApiVersionsInjectable = getInjectable({
return {
callWasSuccessful: true,
response: chain(groups.values())
.filterMap(group => group.preferredVersion?.groupVersion && ({
.flatMap(group => group.versions.map(version => ({
group: group.name,
path: `/apis/${group.preferredVersion.groupVersion}`,
}))
path: `/apis/${version.groupVersion}`,
})))
.collect(v => [...v]),
};
} catch (error) {