From ac292ce2ef147744947bc616f33bc42d0bbfe901 Mon Sep 17 00:00:00 2001 From: John Hefferman Date: Mon, 13 Jan 2025 08:02:37 -0700 Subject: [PATCH 1/2] fix: do not render mismatched scoped slotted data --- .../default-slot/modules/x/parent/parent.html | 1 - .../src/__tests__/utils/expected-failures.ts | 4 -- .../src/compile-js/generate-markup.ts | 2 + .../src/compile-template/index.ts | 1 + .../transformers/component/component.ts | 3 +- .../transformers/component/lwc-component.ts | 6 +-- .../transformers/component/slotted-content.ts | 43 +++++++++++++------ .../src/compile-template/transformers/slot.ts | 27 ++++++++---- packages/@lwc/ssr-runtime/src/render.ts | 8 ++++ 9 files changed, 66 insertions(+), 29 deletions(-) diff --git a/packages/@lwc/engine-server/src/__tests__/fixtures/scoped-slots/default-slot/modules/x/parent/parent.html b/packages/@lwc/engine-server/src/__tests__/fixtures/scoped-slots/default-slot/modules/x/parent/parent.html index c74cb2caf0..484819fe3e 100644 --- a/packages/@lwc/engine-server/src/__tests__/fixtures/scoped-slots/default-slot/modules/x/parent/parent.html +++ b/packages/@lwc/engine-server/src/__tests__/fixtures/scoped-slots/default-slot/modules/x/parent/parent.html @@ -1,6 +1,5 @@