We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d66bc57 commit b3b86c2Copy full SHA for b3b86c2
lib/render-content/plugins/use-english-headings.js
@@ -19,7 +19,11 @@ export default function useEnglishHeadings({ englishHeadings }) {
19
// get English slug
20
const englishSlug = slugger.slug(englishHeading)
21
// use English slug for heading ID and link
22
- node.properties.id = englishSlug
+ if (englishSlug) {
23
+ // only use English slug if there is one, otherwise we'll end up with
24
+ // empty IDs
25
+ node.properties.id = englishSlug
26
+ }
27
})
28
}
29
0 commit comments