From: Sorin Davidoi Date: Wed, 26 Jul 2017 13:03:23 +0000 (+0200) Subject: fix(column): Crash when heading is undefined (#4378) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=b8adb4d7fa6546f415d93d0af8e1d7b0e24a3f54;p=mastodon.git fix(column): Crash when heading is undefined (#4378) --- diff --git a/app/javascript/mastodon/features/ui/components/column.js b/app/javascript/mastodon/features/ui/components/column.js index 2d46264a2..aea102aac 100644 --- a/app/javascript/mastodon/features/ui/components/column.js +++ b/app/javascript/mastodon/features/ui/components/column.js @@ -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 && (