aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2016-08-09 15:04:12 +0200
committerAlex Legler <alex@a3li.li>2016-08-09 15:04:12 +0200
commit277233e99a8e14483a47ca0ee6849319d38c6f0d (patch)
treeabd899f217e84853ed72b46fc389623f5be7584d /app
parentBuild package homepages manually (#588946) (diff)
downloadpackages-277233e99a8e14483a47ca0ee6849319d38c6f0d.tar.gz
packages-277233e99a8e14483a47ca0ee6849319d38c6f0d.tar.bz2
packages-277233e99a8e14483a47ca0ee6849319d38c6f0d.zip
Properly handle homepage being an empty array
Diffstat (limited to 'app')
-rw-r--r--app/views/packages/_package_header.html.erb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/packages/_package_header.html.erb b/app/views/packages/_package_header.html.erb
index e5b5f55..d202576 100644
--- a/app/views/packages/_package_header.html.erb
+++ b/app/views/packages/_package_header.html.erb
@@ -21,7 +21,7 @@
</p>
<p class="kk-package-homepage">
- <% if '' != package.homepage.first %>
+ <% unless package.homepage.empty? || package.homepage.first.nil? || package.homepage.first.empty? %>
<span class="fa fa-fw fa-home"></span> <%= content_tag :a, package.homepage.first, href: package.homepage.first, rel: 'nofollow' %>
<% end %>
</p>