Skip to content

Conversation

@THE-Amrit-mahto-05
Copy link

@THE-Amrit-mahto-05 THE-Amrit-mahto-05 commented Nov 19, 2025

Summary

The docs parser crashed when it encountered documentation blocks where prop.tags was missing or undefined.
This caused the following runtime error during docs generation:

TypeError: Cannot read properties of undefined (reading 'Symbol(Symbol.iterator)')

This PR adds a guard:

if (!prop.tags) continue;

to safely skip entries without tags and prevent the crash.
Fixes #15764

@THE-Amrit-mahto-05 THE-Amrit-mahto-05 marked this pull request as draft November 21, 2025 04:57
@THE-Amrit-mahto-05 THE-Amrit-mahto-05 marked this pull request as ready for review November 21, 2025 04:58
@THE-Amrit-mahto-05
Copy link
Author

@vkarpov15 please review it

Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@vkarpov15 vkarpov15 changed the base branch from master to 8.x November 25, 2025 02:05
@vkarpov15 vkarpov15 added this to the 8.20.2 milestone Nov 25, 2025
@vkarpov15 vkarpov15 merged commit 6de5132 into Automattic:8.x Nov 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs parser crashes when prop.tags is undefined

2 participants