This commit is contained in:
fantasticit 2022-11-28 09:42:15 +08:00
parent fc93feb24e
commit 103de8d263
1 changed files with 2 additions and 2 deletions

View File

@ -161,7 +161,7 @@ export const Tocs: React.FC<{ editor: Editor; getContainer: () => HTMLElement }>
? headings.map((toc) => { ? headings.map((toc) => {
return ( return (
<Anchor.Link <Anchor.Link
key={toc.text} key={'collapsed-' + toc.text}
href={`#${toc.id}`} href={`#${toc.id}`}
title={ title={
<Tooltip key={toc.text} content={toc.text} position="right"> <Tooltip key={toc.text} content={toc.text} position="right">
@ -171,7 +171,7 @@ export const Tocs: React.FC<{ editor: Editor; getContainer: () => HTMLElement }>
/> />
); );
}) })
: nestedHeadings.map((toc) => <Toc key={toc.text} toc={toc} collapsed={collapsed} />)} : nestedHeadings.map((toc) => <Toc key={'!collapsed-' + toc.text} toc={toc} collapsed={collapsed} />)}
</Anchor> </Anchor>
</div> </div>
); );