fix parent in slot wrapper (#4705)

pull/4598/head
pushkin 4 years ago committed by GitHub
parent 1c14e6e971
commit 51c6aaff0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -45,7 +45,7 @@ export default class SlotWrapper extends Wrapper {
renderer,
this.fallback,
node.children,
parent,
this,
strip_whitespace,
next_sibling
);

@ -0,0 +1,7 @@
export default {
test({ assert, target, component }) {
assert.htmlEqual(target.innerHTML, `<span></span>`);
component.enabled = true;
assert.htmlEqual(target.innerHTML, `<span>enabled</span>`);
},
};

@ -0,0 +1,9 @@
<script>
export let enabled = false;
</script>
<span>
<slot>
{#if enabled}enabled{/if}
</slot>
</span>
Loading…
Cancel
Save