Skip to content

Commit 914a07d

Browse files
fix html image alt handling
1 parent 13b362d commit 914a07d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • packages/builder-web-core/widgets-native/html-image

packages/builder-web-core/widgets-native/html-image/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export class ImageElement extends SelfClosingContainer {
5050
"src",
5151
new StringLiteral(this.src || image_smallest_fallback_source_base_64)
5252
),
53-
!!!this.alt && new JSXAttribute("alt", new StringLiteral(this.alt)),
53+
typeof this.alt === "string" &&
54+
new JSXAttribute("alt", new StringLiteral(this.alt)),
5455
];
5556

5657
return <StylableJSXElementConfig>{

0 commit comments

Comments
 (0)