Skip to content

Updates the 'no keywords' template to not error out when no keywords are provided.

Sam Lerner requested to merge issue/google_json_api-3366262:1.0.x into 1.0.x

If you perform a search with no keywords, the default template for 'no results' calls HighlightSearchTerm::highlightSearch() with empty values. This triggers an error in Drupal, as the method is expecting strings to do replacements.

This MR removes the unnecessary highlightSearch() call from the template. It also adds some typing to the function, so it would trigger an error sooner in this situation.

Merge request reports