From 04d55e2a3a23adde5b1536d8329e4fc2b5b500f1 Mon Sep 17 00:00:00 2001 From: levithomason Date: Wed, 4 Nov 2015 10:58:48 -0800 Subject: [PATCH] gracefully handle missing Item image prop --- src/views/Items/Item.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/Items/Item.js b/src/views/Items/Item.js index 2fa024bad4..acde08ebd3 100644 --- a/src/views/Items/Item.js +++ b/src/views/Items/Item.js @@ -34,12 +34,13 @@ export default class Item extends Component { const imageClasses = classNames( 'sd-item-image', 'ui', - this.props.image.props.className, + _.get(this.props, 'image.props.className'), 'image', ); + const imageProps = _.omit(_.get(this.props, 'image.props', {}), 'className'); const image = (
- +
); const meta =
{this.props.meta}
;