Skip to content

Commit

Permalink
shell: Take docs from the correct manifest item
Browse files Browse the repository at this point in the history
Fixes #21040
  • Loading branch information
mvollmer committed Oct 3, 2024
1 parent 7957a12 commit 2f258bc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pkg/shell/topnav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ export class TopNav extends React.Component {
}
}

const item = this.props.compiled.items[this.props.state.component];
if (item && item.docs)
docs = item.docs;

// Check for parent as well
if (docs.length === 0) {
const comp = cockpit.manifests[this.props.state.component];
if (comp && comp.parent && comp.parent.docs)
docs = comp.parent.docs;
// Check first whether we have docs in the "parent" section of
// the manifest.
const comp = cockpit.manifests[this.props.state.component];
if (comp && comp.parent && comp.parent.docs)
docs = comp.parent.docs;
else {
const item = this.props.compiled.items[this.props.state.component];
if (item.docs)
docs = item.docs;
}

const docItems = [];
Expand Down

0 comments on commit 2f258bc

Please sign in to comment.