Skip to content

Commit

Permalink
Merge pull request #201 from EmicoEcommerce/fix-empty-query
Browse files Browse the repository at this point in the history
fix: empty query. Fixes #167
  • Loading branch information
ah-net authored Jul 26, 2024
2 parents faefe63 + d6bee61 commit 5821780
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Model/Autocomplete/DataProvider/AutocompleteDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ public function isSupported(): bool
public function getItems()
{
$query = $this->dataProviderHelper->getQuery();
if (empty($query)) {
return [];
}

$config = $this->config;

/** @var AutocompleteRequest $request */
Expand Down
4 changes: 4 additions & 0 deletions Model/Autocomplete/DataProvider/SuggestionDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ public function isSupported(): bool
public function getItems()
{
$query = $this->dataProviderHelper->getQuery();
if (empty($query)) {
return [];
}

$category = $this->dataProviderHelper->getCategory();
$promises = [];

Expand Down

0 comments on commit 5821780

Please sign in to comment.