Replaced usage of render() by their JSX constructor
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Siklos 2022-08-05 16:23:33 +02:00
parent bc6d44db6a
commit b5aa002877
3 changed files with 13 additions and 12 deletions

View file

@ -43,9 +43,9 @@ export class SVG extends React.Component<ISVGProps> {
let children: React.ReactNode | React.ReactNode[] = [];
if (Array.isArray(this.props.children)) {
children = this.props.children.map(child => new Container({ model: child }).render());
children = this.props.children.map(child => <Container key={`container-${child.properties.id}`} model={child}/>);
} else if (this.props.children !== null) {
children = new Container({ model: this.props.children }).render();
children = <Container key={`container-${this.props.children.properties.id}`} model={this.props.children}/>;
}
return (