diff --git a/src/generators/dom/visitors/Component.js b/src/generators/dom/visitors/Component.js index ab953188e4..6e033fbce9 100644 --- a/src/generators/dom/visitors/Component.js +++ b/src/generators/dom/visitors/Component.js @@ -32,6 +32,7 @@ export default { // Component has children, put them in a separate {{yield}} block if ( hasChildren ) { const yieldName = generator.getUniqueName( `render${name}YieldFragment` ); + const { params } = generator.current; generator.generateBlock( node, yieldName ); @@ -40,7 +41,7 @@ export default { ); generator.current.builders.update.addLine( - `${name}_yieldFragment.update( changed, root );` + `${name}_yieldFragment.update( changed, ${params} );` ); componentInitProperties.push( `_yield: ${name}_yieldFragment`); diff --git a/test/generator/component-yield-multiple-in-each/_config.js b/test/generator/component-yield-multiple-in-each/_config.js index 6a4c62702b..92c29fdf71 100644 --- a/test/generator/component-yield-multiple-in-each/_config.js +++ b/test/generator/component-yield-multiple-in-each/_config.js @@ -1,3 +1,10 @@ export default { - html: '
Hello Alice
Hello Bob
Hello Charles
' + html: 'Hello Alice
Hello Bob
Hello Charles
', + + test ( assert, component, target ) { + component.set({ + people: [ 'Alice', 'Charles', 'Bob' ] + }); + assert.htmlEqual( target.innerHTML, `Hello Alice
Hello Charles
Hello Bob
` ); + } };