File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
modules/docs/src/Volo.Docs.Web/Pages/Documents/Project Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -542,12 +542,7 @@ private async Task<bool> TrySetDocumentAsync()
542542 DocumentNameWithExtension = Document . Name ;
543543 SetDocumentPageTitle ( ) ;
544544
545- if ( Document != null && ! Document . Content . IsNullOrEmpty ( ) )
546- {
547- TocItems = _tocGeneratorService . GenerateTocItems ( Document . Content , TocLevelCount ) ;
548- }
549-
550- await ConvertDocumentContentToHtmlAsync ( ) ;
545+ await ConvertDocumentContentToHtmlAsync ( ) ;
551546
552547 return true ;
553548 }
@@ -605,6 +600,11 @@ private async Task ConvertDocumentContentToHtmlAsync()
605600 else
606601 {
607602 DocumentNavigationsDto = new DocumentNavigationsDto ( ) ;
603+ }
604+
605+ if ( Document != null && ! Document . Content . IsNullOrEmpty ( ) )
606+ {
607+ TocItems = _tocGeneratorService . GenerateTocItems ( Document . Content , TocLevelCount ) ;
608608 }
609609
610610 var converter = _documentToHtmlConverterFactory . Create < DocumentToHtmlConverterContext > ( Document . Format ?? Project . Format ) ;
You can’t perform that action at this time.
0 commit comments