From 84a3073a0d88528e554dbaf72dea744666c96169 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Wed, 3 Jul 2019 08:57:18 +0300 Subject: [PATCH] Update Index.cshtml.cs --- .../Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs index be7ae0ad95..56dd7de5c0 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs @@ -104,14 +104,11 @@ namespace Volo.Docs.Pages.Documents.Project private bool IsDocumentCultureDifferentThanCurrent() { - var currentCulture = CultureInfo.CurrentCulture; - CultureInfo newCulture; - try { - newCulture = CultureInfo.GetCultureInfo(LanguageCode); + var newCulture = CultureInfo.GetCultureInfo(LanguageCode); - return currentCulture.Name != newCulture.Name; + return CultureInfo.CurrentCulture.Name != newCulture.Name; } catch (CultureNotFoundException) {