propagate scope changes across chained slots - fixes #2359

pull/2416/head
Richard Harris 6 years ago
parent 3c840aad88
commit 07ecdb1849

@ -156,7 +156,7 @@ export default class InlineComponentWrapper extends Wrapper {
component_opts.push(`$$inline: true`);
}
const fragment_dependencies = new Set();
const fragment_dependencies = new Set(this.fragment ? ['$$scope'] : []);
this.slots.forEach(slot => {
slot.block.dependencies.forEach(name => {
const is_let = slot.scope.is_let(name);

@ -0,0 +1,7 @@
<script>
import Inner from './Inner.svelte';
</script>
<Inner>
<slot/>
</Inner>

@ -0,0 +1,8 @@
export default {
html: 'one',
test({ assert, component, target }) {
component.text = 'two';
assert.htmlEqual(target.innerHTML, `two`);
}
};

@ -0,0 +1,9 @@
<script>
import Outer from './Outer.svelte';
export let text = 'one';
</script>
<Outer>
{text}
</Outer>
Loading…
Cancel
Save