Skip to content

Commit

Permalink
chore: use already existing config object to call missingKeyCallback
Browse files Browse the repository at this point in the history
Use existing object instead of retrieving the same singleton object from container
  • Loading branch information
dont-know-php committed Feb 12, 2025
1 parent c34190d commit 8b4432d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HasTranslations.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function getTranslation(string $key, string $locale, bool $useFallbackLoc

if ($isKeyMissingFromLocale && $translatableConfig->missingKeyCallback) {
try {
$callbackReturnValue = (app(Translatable::class)->missingKeyCallback)($this, $key, $locale, $translation, $normalizedLocale);
$callbackReturnValue = ($translatableConfig->missingKeyCallback)($this, $key, $locale, $translation, $normalizedLocale);
if (is_string($callbackReturnValue)) {
$translation = $callbackReturnValue;
}
Expand Down

0 comments on commit 8b4432d

Please sign in to comment.