From 26cbeb54925b45b1a3896263779889a94efa4ca6 Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Wed, 2 Oct 2024 09:59:34 +0200 Subject: [PATCH] change tag, add comment --- packages/playwright-ct-react/registerSource.mjs | 2 +- packages/playwright/jsx-runtime.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/playwright-ct-react/registerSource.mjs b/packages/playwright-ct-react/registerSource.mjs index 86df0e56ef..2827d4d8ab 100644 --- a/packages/playwright-ct-react/registerSource.mjs +++ b/packages/playwright-ct-react/registerSource.mjs @@ -40,7 +40,7 @@ function __pwRender(value) { if (isJsxComponent(v)) { const component = v; let type = component.type; - if (type && type.__pw_type === 'fragment') + if (type && type.__pw_jsx_fragment) // detects the playwright mock Fragment (see jsx-runtime.js), used in <> notation type = __pwReact.Fragment; const props = component.props ? __pwRender(component.props) : {}; const key = component.key ? __pwRender(component.key) : undefined; diff --git a/packages/playwright/jsx-runtime.js b/packages/playwright/jsx-runtime.js index 1bfa721361..28df099d02 100644 --- a/packages/playwright/jsx-runtime.js +++ b/packages/playwright/jsx-runtime.js @@ -32,7 +32,7 @@ function jsxs(type, props, key) { }; } -const Fragment = { __pw_type: 'fragment' }; +const Fragment = { __pw_jsx_fragment: true }; module.exports = { Fragment,