Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #277 from alleyinteractive/bug/pre-get-post-on-emp…
Browse files Browse the repository at this point in the history
…ty-queries

Ensure `pre_get_posts` fires for empty queries
  • Loading branch information
jameswburke authored Oct 6, 2020
2 parents 2f10c53 + 8fdcad4 commit ad296b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/endpoints/class-components-endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public function build_query() {
// This ensures we always parse the query so is_home and other flags
// get properly set before we handle template.
if ( empty( $query ) ) {
$wp_query->parse_query();
$wp_query->query( $query );
}

/**
Expand Down

0 comments on commit ad296b4

Please sign in to comment.