From 7c8a59137409c55900d7fecdc0c462c03c3cd974 Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Tue, 8 Oct 2024 00:15:52 +0300 Subject: [PATCH] Simplify logical expression in `InitPatternModal` (#65922) Co-authored-by: ntsekouras Co-authored-by: tyxla --- 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 ) {