Skip to content

Commit

Permalink
Merge pull request #3463 from rbayet/fix-analytics-search-usage-b2b-r…
Browse files Browse the repository at this point in the history
…emoved

[Analytics] Handle case where Magento_Company has been installed, enabled then removed
  • Loading branch information
rbayet authored Dec 4, 2024
2 parents f9629ef + 29ecd37 commit bb8645f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function isCompanyEnabled()
*/
public function getCompaniesList()
{
if ($this->isCompanyEnabled()) {
if ($this->isCompanyEnabled() && ($this->companyRepository !== null)) {
$searchCriteria = $this->searchCriteriaBuilder->create();

return $this->companyRepository->getList($searchCriteria)->getItems(); // Fetch company list.
Expand Down

0 comments on commit bb8645f

Please sign in to comment.