diff --git a/lib/compat/wordpress-6.8/preload.php b/lib/compat/wordpress-6.8/preload.php index 4151ec3c53366..6067481a49e54 100644 --- a/lib/compat/wordpress-6.8/preload.php +++ b/lib/compat/wordpress-6.8/preload.php @@ -17,7 +17,7 @@ function gutenberg_block_editor_preload_paths_6_8( $paths, $context ) { } } - if ( $post ) { + if ( ! empty( $post ) ) { $route_for_post = rest_get_route_for_post( $post ); if ( $route_for_post ) { $paths[] = add_query_arg( 'context', 'edit', $route_for_post );