Skip to content

Commit 26b56dc

Browse files
authored
Fix potential undefined access in parseStability
1 parent 3a8cae2 commit 26b56dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/generators/legacy-json/utils/buildSection.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const createSectionBuilder = () => {
5858
* @param {import('../types.d.ts').HierarchizedEntry} entry - The entry providing stability information.
5959
*/
6060
const parseStability = (section, nodes, { stability }) => {
61-
const stabilityInfo = stability.children.map(node => node.data);
61+
const stabilityInfo = stability.children.map(node => node.data)?.[0];
6262

6363
if (stabilityInfo) {
6464
section.stability = stabilityInfo.index;

0 commit comments

Comments
 (0)