Skip to content

Commit

Permalink
Revert optional chaining in getUserPatterns
Browse files Browse the repository at this point in the history
As per the following feedback, we're going to experiment with no optional chaining for the `getUserPatterns` selector: #54792 (comment)
  • Loading branch information
Siobhan committed Sep 27, 2023
1 parent 4aad9cc commit 3e6923b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -2304,13 +2304,13 @@ function getUserPatterns( state ) {
return {
name: `core/block/${ userPattern.id }`,
id: userPattern.id,
title: userPattern.title?.raw,
title: userPattern.title.raw,
categories: userPattern.wp_pattern_category.map( ( catId ) =>
categories && categories.get( catId )
? categories.get( catId ).slug
: catId
),
content: userPattern.content?.raw,
content: userPattern.content.raw,
syncStatus: userPattern.wp_pattern_sync_status,
};
} );
Expand Down

0 comments on commit 3e6923b

Please sign in to comment.