diff --git a/CHANGELOG.md b/CHANGELOG.md index c963cd2d5a..91eb8b4895 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -239,6 +239,7 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/ - Migrated to radio button for like/dislike where form submission is required - Fixed long citation identifiers break activity layout, in PR [#5507](https://github.com/microsoft/BotFramework-WebChat/pull/5507), by [@OEvgeny](https://github.com/OEvgeny) - Updated file-based import with `.js` extension and removed the file extension from build config, by [@compulim](https://github.com/compulim), in PR [#5516](https://github.com/microsoft/BotFramework-WebChat/pull/5516) +- Fixed [#5518](https://github.com/microsoft/BotFramework-WebChat/issues/5518). Minimal bundled build should work properly, in PR [#5507](https://github.com/microsoft/BotFramework-WebChat/pull/5507), by [@compulim](https://github.com/compulim) # Removed diff --git a/__tests__/html2/basic/bundle/es5.html b/__tests__/html2/basic/bundle/es5.html new file mode 100644 index 0000000000..05c8459cfe --- /dev/null +++ b/__tests__/html2/basic/bundle/es5.html @@ -0,0 +1,53 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html2/basic/bundle/es5.html.snap-1.png b/__tests__/html2/basic/bundle/es5.html.snap-1.png new file mode 100644 index 0000000000..49d0068b80 Binary files /dev/null and b/__tests__/html2/basic/bundle/es5.html.snap-1.png differ diff --git a/__tests__/html2/basic/bundle/full.html b/__tests__/html2/basic/bundle/full.html new file mode 100644 index 0000000000..bd90acf69e --- /dev/null +++ b/__tests__/html2/basic/bundle/full.html @@ -0,0 +1,53 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html2/basic/bundle/full.html.snap-1.png b/__tests__/html2/basic/bundle/full.html.snap-1.png new file mode 100644 index 0000000000..49d0068b80 Binary files /dev/null and b/__tests__/html2/basic/bundle/full.html.snap-1.png differ diff --git a/__tests__/html2/basic/bundle/minimal.html b/__tests__/html2/basic/bundle/minimal.html new file mode 100644 index 0000000000..db8f2fc217 --- /dev/null +++ b/__tests__/html2/basic/bundle/minimal.html @@ -0,0 +1,53 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html2/basic/bundle/minimal.html.snap-1.png b/__tests__/html2/basic/bundle/minimal.html.snap-1.png new file mode 100644 index 0000000000..49d0068b80 Binary files /dev/null and b/__tests__/html2/basic/bundle/minimal.html.snap-1.png differ diff --git a/packages/component/src/providers/HTMLContentTransformCOR/HTMLContentTransformComposer.tsx b/packages/component/src/providers/HTMLContentTransformCOR/HTMLContentTransformComposer.tsx index 98324b4093..f9a4d1c708 100644 --- a/packages/component/src/providers/HTMLContentTransformCOR/HTMLContentTransformComposer.tsx +++ b/packages/component/src/providers/HTMLContentTransformCOR/HTMLContentTransformComposer.tsx @@ -13,7 +13,7 @@ type HTMLContentTransformComposerProps = Readonly<{ const HTMLContentTransformComposer = memo(({ children, middleware }: HTMLContentTransformComposerProps) => { const transform = useMemo(() => { - const enhancers = middleware.map(enhancer => enhancer()).reverse(); + const enhancers = (middleware || []).map(enhancer => enhancer()).reverse(); return enhancers.reduce( (chain: HTMLContentTransformFunction, fn) => fn(chain),