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

Commit

Permalink
Merge branch 'rel/1.1.0-preview1' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaybhargavb committed Oct 18, 2016
2 parents c2fee4d + 61de7fe commit 3004fb8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ public override void Accept(Chunk chunk)
tagHelperChunk.Descriptors = Decorate(tagHelperChunk.Descriptors);
}

base.Accept(chunk);
var parentChunk = chunk as ParentChunk;
if (parentChunk != null)
{
Visit(parentChunk);
}
}

protected override void Visit(ParentChunk parentChunk)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ public override void Accept(Chunk chunk)
Visit(tagHelperChunk);
}

base.Accept(chunk);
var parentChunk = chunk as ParentChunk;
if (parentChunk != null)
{
Visit(parentChunk);
}
}

protected override void Visit(ParentChunk parentChunk)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private static TagHelperChunk GetTagHelperChunk(string name)

private static ParentChunk GetNestedViewComponentTagHelperChunk(string name, bool visitedTagHelperChunks)
{
var parentChunk = new ParentChunk();
var parentChunk = GetTagHelperChunk("blah");
var tagHelperChunk = GetViewComponentTagHelperChunk(name, visitedTagHelperChunks);
parentChunk.Children.Add(tagHelperChunk);
return parentChunk;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void Accept_CorrectlyDecoratesViewComponentChunks()

// Test the parent chunk with view component tag helper inside, Foo.
var expectedParentChunk = (ParentChunk)expectedChunks[1];
var resultParentChunk = Assert.IsType<ParentChunk>(resultChunks[1]);
var resultParentChunk = Assert.IsType<TagHelperChunk>(resultChunks[1]);
Assert.Single(resultParentChunk.Children);

expectedTagHelperChunk = (TagHelperChunk)expectedParentChunk.Children.First();
Expand Down

0 comments on commit 3004fb8

Please sign in to comment.