call create() on new iterations of static each blocks (#762)

pull/764/head
Rich Harris 7 years ago
parent dff1cb5fe3
commit 1f5f9604a8

@ -439,6 +439,7 @@ function unkeyed(
`
: deindent`
${iterations}[#i] = ${create_each_block}( ${params}, ${each_block_value}, ${each_block_value}[#i], #i, #component );
${iterations}[#i].create();
${iterations}[#i].${mountOrIntro}( ${parentNode}, ${anchor} );
`;

@ -0,0 +1,12 @@
export default {
data: {
items: []
},
html: ``,
test (assert, component, target) {
component.set({ items: ['x'] });
assert.htmlEqual(target.innerHTML, `foo`);
}
};

@ -0,0 +1,3 @@
{{#each items as item}}
foo
{{/each}}
Loading…
Cancel
Save