Skip to content

Commit

Permalink
Prevent malformed post type request
Browse files Browse the repository at this point in the history
  • Loading branch information
vindl committed Mar 18, 2020
1 parent b28c17f commit 132345f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ function FullscreenModeClose( { isActive } ) {
const { postType } = useSelect( ( select ) => {
const { getCurrentPostType } = select( 'core/editor' );
const { getPostType } = select( 'core' );
const currentPostType = getCurrentPostType();

return {
postType: getPostType( getCurrentPostType() ),
postType: currentPostType ? getPostType( currentPostType ) : null,
};
}, [] );

Expand Down

0 comments on commit 132345f

Please sign in to comment.