mirror of https://github.com/sveltejs/svelte
fix #1780 just start use parent instead parent.parent in IfBlock wrapper
parent
1deb25e184
commit
079bd4e58a
@ -0,0 +1,13 @@
|
||||
export default {
|
||||
data: {
|
||||
dummy: false,
|
||||
fruits: ['Apple', 'Banana', 'Tomato'],
|
||||
},
|
||||
|
||||
html: '<div><div>Apple</div><div>Banana</div><div>Tomato</div></div>',
|
||||
|
||||
test ( assert, component, target ) {
|
||||
component.set({ dummy: true });
|
||||
assert.htmlEqual(target.innerHTML, '<div><div>Apple</div><div>Banana</div><div>Tomato</div></div>' );
|
||||
}
|
||||
};
|
@ -0,0 +1,7 @@
|
||||
<div>
|
||||
{#if fruits}
|
||||
{#each fruits as fruit (fruit)}
|
||||
<div>{fruit}</div>
|
||||
{/each}
|
||||
{/if}
|
||||
</div>
|
Loading…
Reference in new issue