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) => {
return (
<Anchor.Link
key={toc.text}
key={'collapsed-' + toc.text}
href={`#${toc.id}`}
title={
<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>
</div>
);