Skip to content

Commit

Permalink
Merge pull request #1794 from Automattic/fix/gen-docs
Browse files Browse the repository at this point in the history
build: fix `Cannot read properties of undefined` in `generate-docs.js`
  • Loading branch information
sjinks authored Apr 24, 2024
2 parents dba0d54 + 84db438 commit 450e425
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helpers/generate-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const parseOutput = output => {
}
if ( currentSection === SECTION_EXAMPLES ) {
let description = '';
while ( ! lines[ lineIx ].trim().startsWith( '$' ) ) {
while ( lines[ lineIx ] && ! lines[ lineIx ].trim().startsWith( '$' ) ) {
const descriptionLine = lines[ lineIx ].trim();
if ( description ) {
description += '\n';
Expand Down

0 comments on commit 450e425

Please sign in to comment.