mirror of https://github.com/sveltejs/svelte
call create() on new iterations of static each blocks (#762)
parent
dff1cb5fe3
commit
1f5f9604a8
@ -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…
Reference in new issue