use lodash isUndefined function

This commit is contained in:
August Skare
2018-11-20 15:10:59 +01:00
parent 117726c6d8
commit ea18050589
2 changed files with 7 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
import * as React from 'react';
import styled from 'styled-components';
import * as _ from 'lodash';
import { ContextInterface } from 'ts/context';
import { media } from 'ts/variables';
@@ -69,7 +70,7 @@ const ContentBlock: React.StatelessComponent<ContentBlockProps> = props => {
return (
<Base>
<Title color={props.colors}>{props.title}</Title>
{children === undefined ? null : <Content>{children}</Content>}
{_.isUndefined(children) ? null : <Content>{children}</Content>}
</Base>
);
};