Skip to content

Commit

Permalink
Make ref logic more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
mikachan committed Dec 20, 2022
1 parent 679ecbc commit ea9eb1c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/api-docs/gen-theme-reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,9 @@ const formatType = ( prop ) => {

propTypes.forEach( ( item ) => {
if ( item.type ) types.push( item.type );
// $ref is always an object
if ( item.$ref ) types.push( 'object' );
// refComplete is always an object
if ( item.$ref && item.$ref === '#/definitions/refComplete' )
types.push( 'object' );
} );

type = [ ...new Set( types ) ].join( ', ' );
Expand Down

1 comment on commit ea9eb1c

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3740624744
📝 Reported issues:

Please sign in to comment.