Core Config Check Added

This commit is contained in:
devansh bawari 2021-02-12 20:08:35 +05:30
parent 5f16a87b2c
commit d66438289a
1 changed files with 6 additions and 0 deletions

View File

@ -709,6 +709,12 @@ class Core
if (null === $locale) {
$locale = request()->get('locale') ?: app()->getLocale();
$channelLocales = $this->channelRepository->findOneByField('code', $channel)->locales;
if (! $channelLocales->contains('code', $locale)) {
$locale = config('app.fallback_locale');
}
}
$fields = $this->getConfigField($field);