Skip to content

Commit

Permalink
Merge pull request #1572 from bakaphp/hotfix-index-algolia
Browse files Browse the repository at this point in the history
Merge pull request #1472 from bakaphp/development
  • Loading branch information
kaioken authored Jun 27, 2024
2 parents a8f5b2f + 931f07a commit 5da3c7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Domains/Inventory/Variants/Models/Variants.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public function toSearchableArray(): array
$attributes = $this->attributes()->get();
foreach ($attributes as $attribute) {
//if its over 100 characters we dont want to index it
if (strlen((string) $attribute->value) > 100) {
if (! is_array($attribute->value) && strlen((string) $attribute->value) > 100) {
continue;
}
$variant['attributes'][$attribute->name] = $attribute->value;
Expand Down

0 comments on commit 5da3c7a

Please sign in to comment.