Skip to content

Commit

Permalink
Merge pull request #4982 from cpinitiative/fix_navbar
Browse files Browse the repository at this point in the history
Fix for navbar
  • Loading branch information
bqi343 authored Dec 15, 2024
2 parents 26d5bc9 + 1252a36 commit 6be1680
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/components/MarkdownLayout/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ const NavBar = ({ alignNavButtonsRight = true }) => {
const moduleIdx = React.useMemo(
() => sortedModuleLinks?.findIndex(x => x.id === markdownLayoutInfo.id),
[markdownLayoutInfo, sortedModuleLinks]
);
if (
!sortedModuleLinks ||
!moduleIdx ||
markdownLayoutInfo instanceof SolutionInfo
) {
) as number;
if (!sortedModuleLinks || markdownLayoutInfo instanceof SolutionInfo) {
return null;
}
const prevModule = moduleIdx === 0 ? null : sortedModuleLinks[moduleIdx - 1];
Expand Down

0 comments on commit 6be1680

Please sign in to comment.