mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-04 18:06:08 +01:00
Fix crash if auto detect language on checkout page, and the language couldn't be detected (Fix #4881) (#4888)
This commit is contained in:
parent
8e60932f81
commit
b0c1b0895d
2 changed files with 2 additions and 2 deletions
|
@ -754,7 +754,7 @@ namespace BTCPayServer.Controllers
|
|||
{
|
||||
case "auto":
|
||||
case null when storeBlob.AutoDetectLanguage:
|
||||
lang = _languageService.AutoDetectLanguageUsingHeader(HttpContext.Request.Headers, null).Code;
|
||||
lang = _languageService.AutoDetectLanguageUsingHeader(HttpContext.Request.Headers, null)?.Code;
|
||||
break;
|
||||
case { } langs when !string.IsNullOrEmpty(langs):
|
||||
{
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
<div class="form-check">
|
||||
<input asp-for="AutoDetectLanguage" type="checkbox" class="form-check-input" />
|
||||
<label asp-for="AutoDetectLanguage" class="form-check-label"></label>
|
||||
<div class="form-text">Detects the language of the customer's browser with 99.9% accuracy.</div>
|
||||
<div class="form-text">Detects the language of the customer's browser.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
Loading…
Add table
Reference in a new issue