Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New placeholder feature & hast refactoring #3

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove optional chaining for Node<14 compatibility
  • Loading branch information
Jule Marcoueille committed Mar 30, 2021
commit 517d9900be757d6e7000d582c0c615f2d01d1249
2 changes: 1 addition & 1 deletion src/create-toc.ts
Original file line number Diff line number Diff line change
@@ -138,7 +138,7 @@ function createListItem(heading: Heading, options: NormalizedOptions): ListItem
properties: {
className: buildClass(options.cssClasses.link, heading.tagName),
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
href: `#${heading.properties?.id || ""}`,
href: `#${heading.properties ? (heading.properties.id || "") : ""}`,
},
children: [
{