Skip to content

Commit

Permalink
Simplify logical expression in InitPatternModal (WordPress#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 and karthick-murugan committed Nov 13, 2024
1 parent 5a59680 commit 7c8a591
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 7c8a591

Please sign in to comment.