Skip to content

Commit

Permalink
Build: update topic loop to reference topic names
Browse files Browse the repository at this point in the history
  • Loading branch information
IanWold committed Oct 13, 2024
1 parent 81c05db commit e3301a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build.csx
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,17 @@ new MetalsharpProject()
}
}

if (post.Metadata.TryGetValue("topics", out var topicsObject) && topicsObject is IEnumerable<string> topics)
if (post.Metadata.TryGetValue("topics", out var topicsObject) && topicsObject is IEnumerable<string> topicNames)
{
foreach (var topic in topics)
foreach (var topicName in topicNames)
{
if (topicPosts.TryGetValue(seriesName, out var topicPostsList))
if (topicPosts.TryGetValue(topicName, out var topicPostsList))
{
seriesPosts[topic] = [ ..topicPostsList, post.Metadata ];
seriesPosts[topicName] = [ ..topicPostsList, post.Metadata ];
}
else
{
topicPosts.Add(topic, [ post.Metadata ]);
topicPosts.Add(topicName, [ post.Metadata ]);
}
}
}
Expand Down

0 comments on commit e3301a1

Please sign in to comment.