Skip to content

Commit

Permalink
fixed issue where a widget prop was not being executed as string (tra…
Browse files Browse the repository at this point in the history
…nsformWidgetInChildProps method)
  • Loading branch information
wpdas committed May 11, 2024
1 parent b10e656 commit 37c0679
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/actions/transformSchemaToWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 37c0679

Please sign in to comment.