Skip to content

Commit

Permalink
potential fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danielzsh committed Dec 15, 2024
1 parent 26d5bc9 commit ed17ffe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/MarkdownLayout/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ const NavBar = ({ alignNavButtonsRight = true }) => {
const moduleIdx = React.useMemo(
() => sortedModuleLinks?.findIndex(x => x.id === markdownLayoutInfo.id),
[markdownLayoutInfo, sortedModuleLinks]
);
) as number;
if (
!sortedModuleLinks ||
!moduleIdx ||
markdownLayoutInfo instanceof SolutionInfo
) {
return null;
Expand Down

0 comments on commit ed17ffe

Please sign in to comment.