Skip to content

Commit

Permalink
Trim the search query
Browse files Browse the repository at this point in the history
Trim the search query to stop duplicate terms in the results when someone adds a space on the end
  • Loading branch information
pau1phi11ips authored Nov 5, 2024
1 parent 4bf56f1 commit e84f79a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function maybe_register_assets() {
$data = wp_json_encode(
[
'props' => [
'search_query' => get_search_query(),
'search_query' => trim(get_search_query()),
'result_count' => $wp_query->found_posts,
],
]
Expand Down

0 comments on commit e84f79a

Please sign in to comment.