Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Fixed unsafe cast in CSharpCodeVisitor #813

Closed
wants to merge 0 commits into from

Conversation

ajaybhargavb
Copy link
Contributor

@@ -399,29 +399,38 @@ protected override void Visit(SectionChunk chunk)

public void RenderDesignTimeExpressionBlockChunk(ExpressionBlockChunk chunk)
{
var firstChild = (ExpressionChunk)chunk.Children.FirstOrDefault();

var firstChild = chunk.Children.FirstOrDefault();
if (firstChild != null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you didn't write this but since we're touching bits around this; to avoid lots of indentation lets do:

if (firstChild == null)
{
    return;
}

@ajaybhargavb
Copy link
Contributor Author

🆙 📅

@NTaylorMullen
Copy link
Member

:shipit:

else
{
// First child is not an expression chunk
Accept(chunk.Children.ToList());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to ToList

@ajaybhargavb ajaybhargavb deleted the ajbaaska/vs-crash-fix branch August 8, 2016 23:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants