Skip to content

Commit

Permalink
fix: filter out k8s resources with different nav section names
Browse files Browse the repository at this point in the history
  • Loading branch information
devcatalin committed Sep 13, 2021
1 parent 7eee46a commit f6c5da8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/navsections/K8sResource.nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const subsectionNames = navSectionNames.representation[navSectionNames.K8S_RESOU

const kindHandlersBySubsectionName: Record<string, ResourceKindHandler[]> = {};
ResourceKindHandlers.forEach(kindHandler => {
const navSectionName = kindHandler.navigatorPath[0];
if (navSectionName !== navSectionNames.K8S_RESOURCES) {
return;
}
const subsectionName = kindHandler.navigatorPath[1];
if (kindHandlersBySubsectionName[subsectionName]) {
kindHandlersBySubsectionName[subsectionName].push(kindHandler);
Expand Down

0 comments on commit f6c5da8

Please sign in to comment.