Replace substr with slice

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-04-02 23:25:25 +02:00
parent e6ccc0e65e
commit 750a4233d3
4 changed files with 6 additions and 6 deletions

View file

@ -32,7 +32,7 @@ export const buildReactDomFromTocAst = (
const content = (
<Fragment>
<ShowIf condition={toc.l > 0}>
<JumpAnchor href={headlineUrl} title={rawName} jumpTargetId={slug.substr(1)}>
<JumpAnchor href={headlineUrl} title={rawName} jumpTargetId={slug.slice(1)}>
{rawName}
</JumpAnchor>
</ShowIf>