From f8266a0bba4f6d2195dd128e177933e6e61478ff Mon Sep 17 00:00:00 2001 From: Patryk Tomczyk <13100280+patzick@users.noreply.github.com> Date: Thu, 25 Jan 2024 09:02:28 +0100 Subject: [PATCH] fix(cms-base): improve getOptionsFromNode helper (#542) --- .changeset/swift-flies-fetch.md | 5 + .../public/cms/element/CmsElementText.vue | 17 +- .../html-to-vue/getOptionsFromNode.test.ts | 107 +++++++++++++ .../helpers/html-to-vue/getOptionsFromNode.ts | 69 ++++---- .../helpers/html-to-vue/renderToHtml.ts | 9 +- .../cms-base/helpers/html-to-vue/renderer.ts | 4 +- packages/cms-base/package.json | 5 +- packages/cms-base/vitest.config.ts | 15 ++ pnpm-lock.yaml | 147 +++++------------- 9 files changed, 229 insertions(+), 149 deletions(-) create mode 100644 .changeset/swift-flies-fetch.md create mode 100644 packages/cms-base/helpers/html-to-vue/getOptionsFromNode.test.ts create mode 100644 packages/cms-base/vitest.config.ts diff --git a/.changeset/swift-flies-fetch.md b/.changeset/swift-flies-fetch.md new file mode 100644 index 000000000..a44c75e87 --- /dev/null +++ b/.changeset/swift-flies-fetch.md @@ -0,0 +1,5 @@ +--- +"@shopware-pwa/cms-base": patch +--- + +Potential problems with CmsElementText rendering, when Node object is incorrect diff --git a/packages/cms-base/components/public/cms/element/CmsElementText.vue b/packages/cms-base/components/public/cms/element/CmsElementText.vue index 392e7d367..2135285d0 100644 --- a/packages/cms-base/components/public/cms/element/CmsElementText.vue +++ b/packages/cms-base/components/public/cms/element/CmsElementText.vue @@ -1,6 +1,6 @@