Skip to content

Commit

Permalink
fix: fixed fluent without current locale
Browse files Browse the repository at this point in the history
  • Loading branch information
rasstislav committed Nov 4, 2023
1 parent f5f6a0a commit 5d2571a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,12 @@ public function getIndexName(): ?string

$indexName = strtolower(str_replace('\\', '_', $sng::class));

if (ClassInfo::exists(FluentExtension::class) && $sng->hasExtension(FluentExtension::class)) {
$indexName .= '_' . strtolower(Locale::getCurrentLocale()->Locale);
if (
ClassInfo::exists(FluentExtension::class)
&& $sng->hasExtension(FluentExtension::class)
&& ($locale = Locale::getCurrentLocale())
) {
$indexName .= '_' . strtolower($locale->Locale);
}

if (
Expand Down

0 comments on commit 5d2571a

Please sign in to comment.