Skip to content

Commit

Permalink
FlatTermSelector: Be more defensive about termIds (#63461)
Browse files Browse the repository at this point in the history
Co-authored-by: dsas <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
  • Loading branch information
3 people authored Jul 12, 2024
1 parent 6c3caac commit ebb5788
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function FlatTermSelector( { slug } ) {

const query = {
...DEFAULT_QUERY,
include: _termIds.join( ',' ),
include: _termIds?.join( ',' ),
per_page: -1,
};

Expand All @@ -103,7 +103,7 @@ export function FlatTermSelector( { slug } ) {
: false,
taxonomy: _taxonomy,
termIds: _termIds,
terms: _termIds.length
terms: _termIds?.length
? getEntityRecords( 'taxonomy', slug, query )
: EMPTY_ARRAY,
hasResolvedTerms: hasFinishedResolution( 'getEntityRecords', [
Expand Down

0 comments on commit ebb5788

Please sign in to comment.