Skip to content

Commit

Permalink
Simplify control flow. (#4458)
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrommen authored and aduth committed Jan 16, 2018
1 parent 8cad9ae commit 2e276ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ function gutenberg_intercept_edit_post() {
$post = get_post( $post_id );

// Errors and invalid requests are handled in post.php, do not intercept.
if ( $post ) {
$post_type = $post->post_type;
$post_type_object = get_post_type_object( $post_type );
} else {
if ( ! $post ) {
return;
}

$post_type = $post->post_type;
$post_type_object = get_post_type_object( $post_type );

if ( ! $post_type_object ) {
return;
}
Expand Down

0 comments on commit 2e276ad

Please sign in to comment.