diff --git a/src/internal/spread.js b/src/internal/spread.js index 2b4c8c42d5fd..0075c947cd2b 100644 --- a/src/internal/spread.js +++ b/src/internal/spread.js @@ -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; -} \ No newline at end of file +} diff --git a/test/runtime/samples/component-slot-spread-props/Nested.svelte b/test/runtime/samples/component-slot-spread-props/Nested.svelte new file mode 100644 index 000000000000..08fb4697a924 --- /dev/null +++ b/test/runtime/samples/component-slot-spread-props/Nested.svelte @@ -0,0 +1,4 @@ +
+ +
+
diff --git a/test/runtime/samples/component-slot-spread-props/_config.js b/test/runtime/samples/component-slot-spread-props/_config.js new file mode 100644 index 000000000000..042bdca6ecec --- /dev/null +++ b/test/runtime/samples/component-slot-spread-props/_config.js @@ -0,0 +1,19 @@ +export default { + html: ` +
+ +
+
+ `, + + async test({ assert, component, target }) { + component.value = 'foo'; + + assert.htmlEqual(target.innerHTML, ` +
+ +
+
+ `); + } +}; diff --git a/test/runtime/samples/component-slot-spread-props/main.svelte b/test/runtime/samples/component-slot-spread-props/main.svelte new file mode 100644 index 000000000000..69d1269217a7 --- /dev/null +++ b/test/runtime/samples/component-slot-spread-props/main.svelte @@ -0,0 +1,8 @@ + + + + +