Skip to content

Commit

Permalink
show image only if its present
Browse files Browse the repository at this point in the history
  • Loading branch information
madhums committed Dec 10, 2012
1 parent 4d83b94 commit f43663c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/articles/form.jade
Expand Up @@ -43,5 +43,5 @@ block content
 
a.btn(href='/articles', title="cancel") Cancel
.span5
if (!article.isNew && article.image)
if (!article.isNew && article.image && article.image.files && article.image.files.length)
img(src=article.image.cdnUri + '/mini_' + article.image.files[0])
2 changes: 1 addition & 1 deletion app/views/articles/show.jade
Expand Up @@ -19,7 +19,7 @@ block content
i.icon-tags
| #{tag}
.span3
if (!article.isNew && article.image)
if (!article.isNew && article.image && article.image.files && article.image.files.length)
img(src=article.image.cdnUri + '/mini_' + article.image.files[0])

p
Expand Down

0 comments on commit f43663c

Please sign in to comment.