From a1edc91310c658b9b6dfdabcfc131acb5040c483 Mon Sep 17 00:00:00 2001 From: Tan Li Hau Date: Thu, 4 Mar 2021 10:43:33 +0800 Subject: [PATCH] fix tests --- src/compiler/compile/render_ssr/handlers/Slot.ts | 6 ------ .../samples/component-slot-nested-in-slot/One.svelte | 6 ++++-- .../samples/component-svelte-slot-let-aliased/main.svelte | 4 ++-- .../runtime/samples/component-svelte-slot-let-b/main.svelte | 4 ++-- test/runtime/samples/component-svelte-slot-let-e/A.svelte | 4 ++-- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/compiler/compile/render_ssr/handlers/Slot.ts b/src/compiler/compile/render_ssr/handlers/Slot.ts index f89b619c466d..781e62bb0024 100644 --- a/src/compiler/compile/render_ssr/handlers/Slot.ts +++ b/src/compiler/compile/render_ssr/handlers/Slot.ts @@ -26,12 +26,6 @@ export default function(node: Slot, renderer: Renderer, options: RenderOptions & `); if (slot && nearest_inline_component) { - const lets = node.lets; - const seen = new Set(lets.map(l => l.name.name)); - - nearest_inline_component.lets.forEach(l => { - if (!seen.has(l.name.name)) lets.push(l); - }); options.slot_scopes.set(slot, { input: get_slot_scope(node.lets), output: renderer.pop() diff --git a/test/runtime/samples/component-slot-nested-in-slot/One.svelte b/test/runtime/samples/component-slot-nested-in-slot/One.svelte index e27437c450fc..acb6a03358be 100644 --- a/test/runtime/samples/component-slot-nested-in-slot/One.svelte +++ b/test/runtime/samples/component-slot-nested-in-slot/One.svelte @@ -3,6 +3,8 @@ export let a, b; - - + + + + diff --git a/test/runtime/samples/component-svelte-slot-let-aliased/main.svelte b/test/runtime/samples/component-svelte-slot-let-aliased/main.svelte index dabf1d65ef0c..5ca0cbbd100c 100644 --- a/test/runtime/samples/component-svelte-slot-let-aliased/main.svelte +++ b/test/runtime/samples/component-svelte-slot-let-aliased/main.svelte @@ -4,8 +4,8 @@ export let things; - - + + {x} \ No newline at end of file diff --git a/test/runtime/samples/component-svelte-slot-let-b/main.svelte b/test/runtime/samples/component-svelte-slot-let-b/main.svelte index 584240d14d27..bb24b97a3b15 100644 --- a/test/runtime/samples/component-svelte-slot-let-b/main.svelte +++ b/test/runtime/samples/component-svelte-slot-let-b/main.svelte @@ -2,8 +2,8 @@ import Nested from './Nested.svelte'; - - + + {count} \ No newline at end of file diff --git a/test/runtime/samples/component-svelte-slot-let-e/A.svelte b/test/runtime/samples/component-svelte-slot-let-e/A.svelte index 3ba0e62cd961..f982aef7b14b 100644 --- a/test/runtime/samples/component-svelte-slot-let-e/A.svelte +++ b/test/runtime/samples/component-svelte-slot-let-e/A.svelte @@ -3,8 +3,8 @@ export let x; - - + + {reflected}