Skip to content

Commit

Permalink
Fix exception if value isn’t a string (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
aerni authored May 2, 2023
1 parent 2c635c1 commit 7faff08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Migrators/SeoProMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected function transform(Collection $data, ?Collection $oldData = null): Col
return $data
->merge($transformed)
->map(
fn ($value) => Str::contains($value, '@seo:')
fn ($value) => is_string($value) && Str::contains($value, '@seo:')
? Str::replace('@seo:', '@field:', $value)
: $value
);
Expand Down

0 comments on commit 7faff08

Please sign in to comment.