fix(column): Crash when heading is undefined (#4378)

This commit is contained in:
Sorin Davidoi 2017-07-26 15:03:23 +02:00 committed by Eugen Rochko
parent 4f5d39c879
commit d63950f5b0

View file

@ -38,7 +38,7 @@ export default class Column extends React.PureComponent {
render () {
const { heading, icon, children, active, hideHeadingOnMobile } = this.props;
const showHeading = !hideHeadingOnMobile || (hideHeadingOnMobile && !isMobile(window.innerWidth));
const showHeading = heading && (!hideHeadingOnMobile || (hideHeadingOnMobile && !isMobile(window.innerWidth)));
const columnHeaderId = showHeading && heading.replace(/ /g, '-');
const header = showHeading && (