fix comment

This commit is contained in:
Felix Roos 2023-02-13 00:42:16 +01:00
parent 64b8fd9584
commit be3f68ed06
2 changed files with 1 additions and 1 deletions

View File

@ -10,6 +10,7 @@ type Props = {
const { headings, githubEditUrl } = Astro.props as Props;
let currentPage = Astro.url.pathname;
// remove slash before #
currentPage = currentPage.endsWith('/') ? currentPage.slice(0, -1) : currentPage;
---

View File

@ -12,7 +12,6 @@ const TableOfContents: FunctionalComponent<{ headings: MarkdownHeading[]; curren
headings = [],
currentPage,
}) => {
// remove slash before #
const toc = useRef<any>();
const onThisPageID = 'on-this-page-heading';
const itemOffsets = useRef<ItemOffsets[]>([]);