Skip to content

Commit

Permalink
Log topics object type
Browse files Browse the repository at this point in the history
  • Loading branch information
IanWold committed Oct 14, 2024
1 parent 43ecdf9 commit 3dfcdf1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.csx
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,11 @@ new MetalsharpProject()
}
}

if (post.Metadata.TryGetValue("topics", out var topicsObject) && topicsObject is JsonElement topicNamesElement)
if (post.Metadata.TryGetValue("topics", out var topicsObject))
{
Console.WriteLine(typeof(topicsObject).FullName());
if (topicsObject is JsonElement topicNamesElement)
{
foreach (var topicNameElement in topicNamesElement.EnumerateArray())
{
var topicName = topicNameElement.GetString();
Expand All @@ -167,6 +170,7 @@ new MetalsharpProject()
topicPosts.Add(topicName, [ post.Metadata ]);
}
}
}
}
}

Expand Down

0 comments on commit 3dfcdf1

Please sign in to comment.