Skip to content

Commit

Permalink
No need to iterate over locales
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofandel committed Nov 20, 2024
1 parent 9861390 commit fbc47a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Behaviors/HasSlug.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public function getSlugParams(?string $locale = null, bool $skipUnchanged = fals
if (empty($fields)) {
return $locale === null ? [] : null;
}
foreach (getLocales() as $appLocale) {
foreach ($locale ? [$locale] : getLocales() as $appLocale) {
if ($appLocale === $locale || $locale === null) {
$wasChanged = $this->wasRecentlyCreated;

Expand Down

0 comments on commit fbc47a3

Please sign in to comment.