Skip to content

Commit

Permalink
fix for #524
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Apr 25, 2017
1 parent 9427f63 commit 11d8698
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/generators/dom/preprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ function preprocessChildren ( generator, block, state, node, isTopLevel ) {

if ( lastChild ) {
lastChild.next = child;
lastChild.needsAnchor = !child._state.name;
lastChild.needsAnchor = !child._state || !child._state.name;
}

lastChild = child;
Expand Down
2 changes: 2 additions & 0 deletions test/runtime/samples/component-yield-follows-element/Foo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<div>before</div>
{{yield}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
html: `
<div>before</div>
test
`
};
11 changes: 11 additions & 0 deletions test/runtime/samples/component-yield-follows-element/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Foo>test</Foo>

<script>
import Foo from './Foo.html';

export default {
components: {
Foo
}
};
</script>

0 comments on commit 11d8698

Please sign in to comment.