Skip to content

Commit

Permalink
Pass parent attributes to child rawXML child components
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicole Orchard authored and Nicole Orchard committed Nov 27, 2024
1 parent 74b4793 commit de79584
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/mjml-core/src/createComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ export class BodyComponent extends Component {
children = children || this.props.children

if (rawXML) {
return children.map((child) => jsonToXML(child)).join('\n')
return children.map((child) => {

Check failure on line 210 in packages/mjml-core/src/createComponent.js

View workflow job for this annotation

GitHub Actions / build (16.x)

Expected to return a value in arrow function

Check failure on line 210 in packages/mjml-core/src/createComponent.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Expected to return a value in arrow function

Check failure on line 210 in packages/mjml-core/src/createComponent.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected to return a value in arrow function
child.attributes = {...attributes, ...child.attributes}
jsonToXML(child)
}).join('\n')
}

const sibling = children.length
Expand Down

0 comments on commit de79584

Please sign in to comment.