Remove the scope key from props when calculating spread

pull/2618/head
Emil Tholin 5 years ago
parent 93f7ecca1d
commit 5a0be42006

@ -2,7 +2,7 @@ export function get_spread_update(levels, updates) {
const update = {};
const to_null_out = {};
const accounted_for = {};
const accounted_for = { $$scope: 1 };
let i = levels.length;
while (i--) {
@ -34,4 +34,4 @@ export function get_spread_update(levels, updates) {
}
return update;
}
}

@ -0,0 +1,4 @@
<div>
<slot />
<div {...$$props}></div>
</div>

@ -0,0 +1,19 @@
export default {
html: `
<div>
<input />
<div class="foo"></div>
</div>
`,
async test({ assert, component, target }) {
component.value = 'foo';
assert.htmlEqual(target.innerHTML, `
<div>
<input />
<div class="foo"></div>
</div>
`);
}
};

@ -0,0 +1,8 @@
<script>
import Nested from './Nested.svelte';
export let value = '';
</script>
<Nested class="foo">
<input bind:value />
</Nested>
Loading…
Cancel
Save