Skip to content

Commit

Permalink
Temporary fix for infinite loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixarntz authored and epiqueras committed Sep 16, 2019
1 parent 483ee9d commit 24e7a1f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/block-library/src/post-content/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
* @return string Returns the filtered post content of the current post.
*/
function render_block_core_post_content() {
// TODO: Without this temporary fix, an infinite loop can occur.
if ( is_admin() || defined( 'REST_REQUEST' ) ) {
return '';
}

if ( ! in_the_loop() ) {
rewind_posts();
the_post();
Expand Down

0 comments on commit 24e7a1f

Please sign in to comment.