Skip to content

Commit

Permalink
Simplify logical expression in InitPatternModal (#65922)
Browse files Browse the repository at this point in the history
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: tyxla <[email protected]>
  • Loading branch information
3 people authored Oct 7, 2024
1 parent e4f1150 commit 502a2d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/edit-post/src/components/init-pattern-modal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export default function InitPatternModal() {
isNewPost: isCleanNewPost(),
};
}, [] );
const [ isModalOpen, setIsModalOpen ] = useState( () =>
isNewPost && postType === 'wp_block' ? true : false
const [ isModalOpen, setIsModalOpen ] = useState(
() => isNewPost && postType === 'wp_block'
);

if ( postType !== 'wp_block' || ! isNewPost ) {
Expand Down

0 comments on commit 502a2d5

Please sign in to comment.