From cf666ff34d073775e053dc95f06f2849889276c8 Mon Sep 17 00:00:00 2001 From: Seun Wale Lawal <35162819+seunss@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:36:16 -0500 Subject: [PATCH] Null .ToString (#1676) --- .changeset/old-dots-design.md | 5 +++++ packages/core/src/parsers/builder/builder.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/old-dots-design.md diff --git a/.changeset/old-dots-design.md b/.changeset/old-dots-design.md new file mode 100644 index 0000000000..1347e3ada0 --- /dev/null +++ b/.changeset/old-dots-design.md @@ -0,0 +1,5 @@ +--- +'@builder.io/mitosis': patch +--- + +check for null string diff --git a/packages/core/src/parsers/builder/builder.ts b/packages/core/src/parsers/builder/builder.ts index 5e2ac93ab3..77c986a3cf 100644 --- a/packages/core/src/parsers/builder/builder.ts +++ b/packages/core/src/parsers/builder/builder.ts @@ -391,7 +391,7 @@ const componentMappers: { * If width if undefined, do not create a binding otherwise its JSX will * be which is not valid due to the empty expression. */ - ...(col.width !== undefined && { + ...(col.width != null && { bindings: { width: { code: col.width.toString() }, },