From c6880ab42b2b5f4cc06de5de400c8e03d94b353b Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Fri, 5 Jun 2015 18:28:06 -0700 Subject: [PATCH] fix(RetinaImg): shoudn't throw an exception if you forget to provide an image name --- src/components/retina-img.cjsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/retina-img.cjsx b/src/components/retina-img.cjsx index 4c7b3c612..183c13f14 100644 --- a/src/components/retina-img.cjsx +++ b/src/components/retina-img.cjsx @@ -125,6 +125,8 @@ class RetinaImg extends React.Component _pathFor: (name) -> + return null unless name and _.isString(name) + [basename, ext] = name.split('.') if @props.active is true name = "#{basename}-active.#{ext}"