Skip to content

Commit

Permalink
Merge pull request #11 from brilliancenw/develop-3
Browse files Browse the repository at this point in the history
updating the custom index return type
  • Loading branch information
markmiddleton authored Nov 8, 2022
2 parents 47219cc + e9fcadc commit 6ecc737
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/services/AlgoliaSyncService.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,9 @@ public function getAlgoliaIndex($element): array

foreach ($eventInfo['sectionId'] as $sectionId) {
$potentialIndexOverride = $allSettings['algoliaElements'][$eventInfo['type']][$sectionId]['customIndex'];
if (is_array($potentialIndexOverride) && count($potentialIndexOverride) > 0) {
foreach ($potentialIndexOverride AS $indexOverride) {
$returnIndex[] = $indexOverride;
}

if (!empty($potentialIndexOverride)) {
$returnIndex[] = $potentialIndexOverride;
return $returnIndex;
}
}
Expand Down

0 comments on commit 6ecc737

Please sign in to comment.