diff --git a/packages/teleport-plugin-common/src/builders/style-builders.ts b/packages/teleport-plugin-common/src/builders/style-builders.ts index 81a0006f1..710200599 100644 --- a/packages/teleport-plugin-common/src/builders/style-builders.ts +++ b/packages/teleport-plugin-common/src/builders/style-builders.ts @@ -218,9 +218,9 @@ export const setPropValueForCompStyle = (params: { if (templateStyle === 'jsx' && isJSXElement(root)) { root.openingElement?.attributes.forEach((attribute: types.JSXAttribute) => { if ( - attribute.value.type === 'StringLiteral' && + attribute.value?.type === 'StringLiteral' && attribute.value?.value && - attribute.name.name === attr + attribute.name?.name === attr ) { attribute.value.value = getClassName(attribute.value.value) } diff --git a/packages/teleport-plugin-html-base-component/src/node-handlers.ts b/packages/teleport-plugin-html-base-component/src/node-handlers.ts index d93a07473..1d091f004 100644 --- a/packages/teleport-plugin-html-base-component/src/node-handlers.ts +++ b/packages/teleport-plugin-html-base-component/src/node-handlers.ts @@ -1021,7 +1021,9 @@ const getValueFromReference = ( } if ( - ['string', 'number', 'object', 'element', 'array'].includes(usedReferenceValue?.type) === false + ['string', 'number', 'object', 'element', 'array', 'boolean'].includes( + usedReferenceValue?.type + ) === false ) { throw new HTMLComponentGeneratorError( `Attribute is using dynamic value, but received of type ${JSON.stringify(