Skip to content

Commit 4a25302

Browse files
committed
Fix a failing unit test after #3146
1 parent 588bf8f commit 4a25302

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/register.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ function gutenberg_can_edit_post_type( $post_type ) {
292292
}
293293

294294
$post_type_object = get_post_type_object( $post_type );
295-
if ( ! $post_type_object->show_in_rest ) {
295+
if ( $post_type_object && ! $post_type_object->show_in_rest ) {
296296
$can_edit = false;
297297
}
298298

0 commit comments

Comments
 (0)