Skip to content

Commit

Permalink
Fix a failing unit test after #3146
Browse files Browse the repository at this point in the history
  • Loading branch information
pento committed Oct 26, 2017
1 parent 588bf8f commit 4a25302
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/register.php
Original file line number Diff line number Diff line change
@@ -292,7 +292,7 @@ function gutenberg_can_edit_post_type( $post_type ) {
}

$post_type_object = get_post_type_object( $post_type );
if ( ! $post_type_object->show_in_rest ) {
if ( $post_type_object && ! $post_type_object->show_in_rest ) {
$can_edit = false;
}

0 comments on commit 4a25302

Please sign in to comment.