Skip to content

Commit

Permalink
Check if fluent locale exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Rens committed Dec 20, 2023
1 parent a09ba7d commit 0b62db8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Services/ElasticaService.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function setIndex(string $indexName): self
$this->extend('updateIndexName', $indexName);

if (ClassInfo::exists(FluentState::class)) {
$locale = strtolower(FluentState::singleton()->getLocale());
$locale = strtolower(FluentState::singleton()->getLocale() ?? '');

if (!str_contains($indexName, $locale)) {
$indexName .= '-' . strtolower($locale);
Expand Down

0 comments on commit 0b62db8

Please sign in to comment.