Skip to content

Commit

Permalink
Merge pull request #527 from sveltejs/gh-524
Browse files Browse the repository at this point in the history
fix for #524
  • Loading branch information
Rich-Harris authored Apr 25, 2017
2 parents 9ae2540 + 11d8698 commit ae75bef
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 ae75bef

Please sign in to comment.