diff --git a/lib/actions/transformSchemaToWidget.js b/lib/actions/transformSchemaToWidget.js index 894ce1d..1f77008 100644 --- a/lib/actions/transformSchemaToWidget.js +++ b/lib/actions/transformSchemaToWidget.js @@ -355,12 +355,12 @@ const transformWidgetInChildProps = (childProps, fileSchemas) => { let entryValue = entry[1]; // Ignora se nao tiver conteúdo JSX - if (!entryValue.includes("/>")) { + if (typeof entryValue !== "string" || !entryValue.includes("/>")) { return; } const foundJSXs = extractJSX(entryValue); - if (foundJSXs.length > 0) { + if (foundJSXs?.length > 0) { foundJSXs.forEach((jsx) => { const widgetContent = processChildrenWidget(`<>${jsx}`, fileSchemas); entryValue = entryValue.replace(jsx, widgetContent);