Skip to content

Commit 0d00c6b

Browse files
committed
Merge pull request #82 from sirwolfgang/master
add nil error check on error text
2 parents 440747a + 8e62b78 commit 0d00c6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/protips/_grid.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- show_ad_every = width*2+width-2
55
- items = show_job ? protips.each_slice(show_ad_every).map{|row| row.count == show_ad_every ? row.concat(['show-ad', nil]) : row }.flatten : protips
66

7-
- if collection.respond_to?(:error)
7+
- if collection.respond_to?(:error) && !collection.error.nil?
88
.error
99
="#{collection.error} Meanwhile you can "
1010
=link_to 'create a pro tip', new_protip_path

0 commit comments

Comments
 (0)