From c44fa07215402b0d59f3f1531069417eac6e4eb2 Mon Sep 17 00:00:00 2001 From: Berkan Sasmaz Date: Wed, 25 May 2022 12:11:02 +0300 Subject: [PATCH] fix(modules/docs): null exception problem --- .../src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 f8b17ed2fa..c68d25d1e8 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 @@ -78,7 +78,7 @@ namespace Volo.Docs.Pages.Documents.Project public bool FullSearchEnabled { get; set; } - public bool IsLatestVersion => Version == LatestVersionInfo.Version; + public bool IsLatestVersion { get; private set; } private const int MaxDescriptionMetaTagLength = 200; private readonly IDocumentAppService _documentAppService; @@ -335,6 +335,8 @@ namespace Volo.Docs.Pages.Documents.Project Value = CreateVersionLink(LatestVersionInfo, v.Version, DocumentName), Selected = v.IsSelected }).ToList(); + + IsLatestVersion = Version == LatestVersionInfo.Version; } private VersionInfoViewModel GetLatestVersionInfo(List versions)