Skip to content
This repository was archived by the owner on Mar 20, 2019. It is now read-only.

Commit 8e62b78

Browse files
committed
add nil error check on error text
1 parent 440747a commit 8e62b78

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)