From 67f3bedb0ae70fe1c9bb835794d47bd9b3c15058 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Mon, 7 Oct 2024 17:59:28 +0300 Subject: [PATCH] Simplify logical expression in `InitPatternModal` --- packages/edit-post/src/components/init-pattern-modal/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/edit-post/src/components/init-pattern-modal/index.js b/packages/edit-post/src/components/init-pattern-modal/index.js index 4288557ec712d6..1bfeadd73f94a6 100644 --- a/packages/edit-post/src/components/init-pattern-modal/index.js +++ b/packages/edit-post/src/components/init-pattern-modal/index.js @@ -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 ) {