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 6b7d035 commit ae5ccd0Copy full SHA for ae5ccd0
src/generators/legacy-html/index.mjs
@@ -130,10 +130,13 @@ export default {
130
// Retrieves when this node was added to the API docs
131
const addedAt = head.updates.find(({ type }) => type === 'introduced_in');
132
133
+ // In case there's no Heading, we make a little capitalization of the filename
134
+ const apiAsHeading = head.api.charAt(0).toUpperCase() + head.api.slice(1);
135
+
136
const generatedTemplate = {
137
api: head.api,
138
added: addedAt ? addedAt.version[0] : '',
- section: head.heading.data.name,
139
+ section: head.heading.data.name || apiAsHeading,
140
version: `v${version.toString()}`,
141
toc: String(parsedToC),
142
nav: String(activeSideNav),
0 commit comments