Skip to content

Commit d0cb519

Browse files
committed
Add more comments
1 parent 68402fc commit d0cb519

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Elastic.Markdown/Slices/IndexViewModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public static VersionDrownDownItemViewModel[] FromLegacyPageMappings(LegacyPageM
6969
var groupedVersions = GroupByMajorVersion(legacyPageMappings);
7070
return groupedVersions.Select(m =>
7171
{
72+
// If there is more than one version, we need to create a dropdown
7273
if (m.Value.Count != 1)
7374
{
7475
return new VersionDrownDownItemViewModel
@@ -85,6 +86,8 @@ public static VersionDrownDownItemViewModel[] FromLegacyPageMappings(LegacyPageM
8586
}
8687

8788
var legacyPageMapping = legacyPageMappings.First(x => x.Version == m.Value.First());
89+
90+
// If there is only one version, we don't need to create a dropdown
8891
return new VersionDrownDownItemViewModel
8992
{
9093
Name = legacyPageMapping.Version,

0 commit comments

Comments
 (0)