web: Components: Fixed checking for presence of containerWidth in element property for RowContent.

This commit is contained in:
Ilya Oleshko 2019-09-10 15:11:16 +03:00
parent 7f3dff2933
commit ba17ae41d0

View File

@ -114,7 +114,7 @@ const RowContent = props => {
{children.map((element, index) => {
if (index > 1) {
return (
<SideContainerWrapper key={'side-' + index} containerWidth={element.props.containerWidth} >
<SideContainerWrapper key={'side-' + index} containerWidth={element.props && element.props.containerWidth} >
{element}
</SideContainerWrapper>
);
@ -128,8 +128,7 @@ const RowContent = props => {
};
RowContent.propTypes = {
children: PropTypes.node.isRequired,
containerWidth: PropTypes.string
children: PropTypes.node.isRequired
};
export default RowContent;