From a85a2b9c2c0d10785fa4a90d266ac9dc3a6b6514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Popek?= <78650133+Varixo@users.noreply.github.com> Date: Sat, 27 Jul 2024 00:43:56 +0200 Subject: [PATCH] fix(v2): mutating component props (#6725) --- packages/qwik/src/core/v2/ssr/ssr-render-jsx.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/qwik/src/core/v2/ssr/ssr-render-jsx.ts b/packages/qwik/src/core/v2/ssr/ssr-render-jsx.ts index bccb14c1dfc..aaa1ba0e3ad 100644 --- a/packages/qwik/src/core/v2/ssr/ssr-render-jsx.ts +++ b/packages/qwik/src/core/v2/ssr/ssr-render-jsx.ts @@ -256,7 +256,8 @@ function processJSXNode( } else if (type === SSRRaw) { ssr.htmlNode(jsx.props.data as string); } else if (isQwikComponent(type)) { - ssr.openComponent(isDev ? [DEBUG_TYPE, VirtualType.Component] : EMPTY_ARRAY); + // prod: use new instance of an array for props, we always modify props for a component + ssr.openComponent(isDev ? [DEBUG_TYPE, VirtualType.Component] : []); const host = ssr.getLastNode(); ssr.getComponentFrame(0)!.distributeChildrenIntoSlots(jsx.children, styleScoped); const jsxOutput = applyQwikComponentBody(ssr, jsx, type);