From f751e134eb37bbff9692fb4aab0d40268db47210 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Tue, 2 Jul 2024 11:09:15 +0400 Subject: [PATCH] Fix bug with default language selection --- Bloxstrap/Locale.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bloxstrap/Locale.cs b/Bloxstrap/Locale.cs index 017519e..d3ed71b 100644 --- a/Bloxstrap/Locale.cs +++ b/Bloxstrap/Locale.cs @@ -51,7 +51,7 @@ namespace Bloxstrap { "vi", "Tiếng Việt" } }; - public static string GetIdentifierFromName(string language) => Locale.SupportedLocales.Where(x => x.Value == language).First().Key; + public static string GetIdentifierFromName(string language) => SupportedLocales.FirstOrDefault(x => x.Value == language).Key ?? "nil"; public static List GetLanguages() {