Skip to content

Commit

Permalink
Template Loader: Add separate if guard.
Browse files Browse the repository at this point in the history
  • Loading branch information
epiqueras committed Dec 2, 2019
1 parent 521bf3b commit 2f18a4a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/template-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ function gutenberg_find_template( $template_file ) {
);
}
}
$_wp_current_template_content = $current_template_post->post_content;

if ( $current_template_post ) {
$_wp_current_template_content = $current_template_post->post_content;
}

// Add extra hooks for template canvas.
add_action( 'wp_head', 'gutenberg_viewport_meta_tag', 0 );
Expand Down

0 comments on commit 2f18a4a

Please sign in to comment.