Skip to content

Commit 055f8c9

Browse files
author
Illia Obukhau
committed
fix(html-element-web): change conditions for html rendering
1 parent 74cd9ba commit 055f8c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/pluggableWidgets/html-element-web/src/HTMLElement.editorPreview.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { HTMLTag } from "./components/HTMLTag";
44
import { isVoidElement, prepareTag } from "./utils/props-utils";
55

66
export function preview(props: HTMLElementPreviewProps): ReactElement {
7-
console.dir(props, { depth: 4 });
87
const tag = prepareTag(props.tagName, props.tagNameCustom);
98

109
const items = props.tagUseRepeat ? [1, 2, 3] : [1];
10+
const canUseUnsafeHTML = !props.tagUseRepeat && props.tagContentHTML;
1111

1212
return (
1313
<Fragment>
@@ -18,7 +18,7 @@ export function preview(props: HTMLElementPreviewProps): ReactElement {
1818
<HTMLTag
1919
key={i}
2020
tagName={tag}
21-
unsafeHTML={props.tagContentRepeatHTML ? undefined : props.tagContentHTML}
21+
unsafeHTML={canUseUnsafeHTML ? props.tagContentHTML : undefined}
2222
attributes={{
2323
className: props.className,
2424
style: props.styleObject

0 commit comments

Comments
 (0)