From 277233e99a8e14483a47ca0ee6849319d38c6f0d Mon Sep 17 00:00:00 2001
From: Alex Legler
Date: Tue, 9 Aug 2016 15:04:12 +0200
Subject: Properly handle homepage being an empty array
---
app/views/packages/_package_header.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'app')
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 @@
- <% if '' != package.homepage.first %>
+ <% unless package.homepage.empty? || package.homepage.first.nil? || package.homepage.first.empty? %>
<%= content_tag :a, package.homepage.first, href: package.homepage.first, rel: 'nofollow' %>
<% end %>
--
cgit v1.2.3-65-gdbad