Skip to content

Commit

Permalink
Merge branch '1.14' into fix_suggestion_init_master
Browse files Browse the repository at this point in the history
  • Loading branch information
hknezevic committed Oct 20, 2020
2 parents 6014a70 + d21758b commit 6ecf6ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Core/Pagination/Pagerfanta/BaseAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ private function setExtraInfo(SearchResult $searchResult)
$this->facets = $searchResult->facets;
$this->maxScore = $searchResult->maxScore;
$this->nbResults = $searchResult->totalCount;
$this->suggestion = $searchResult instanceof ExtraSearchResult ? $searchResult->suggestion : new Suggestion([]);
$this->suggestion = new Suggestion([]);

if ($searchResult instanceof ExtraSearchResult && $searchResult->suggestion instanceof Suggestion) {
$this->suggestion = $searchResult->suggestion;
}

$this->isExtraInfoInitialized = true;
}
Expand Down

0 comments on commit 6ecf6ff

Please sign in to comment.