From b6ed63841d7912e9bb2eaf8df2ebf76d7987b60e Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 8 Jun 2020 18:12:32 -0500 Subject: [PATCH] footer: fix exception if git hash isn't defined. The git hash may be undefined when running in a Docker container. --- app/views/static/_footer.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/static/_footer.html.erb b/app/views/static/_footer.html.erb index 2c733bbad..e9a91bb27 100644 --- a/app/views/static/_footer.html.erb +++ b/app/views/static/_footer.html.erb @@ -5,7 +5,7 @@ / <% if Danbooru.config.source_code_url.present? %> - <%= link_to Danbooru.config.source_code_url, title: "Running commit: #{Rails.application.config.x.git_hash.first(9)}", class: "social-icon" do %> + <%= link_to Danbooru.config.source_code_url, title: "Running commit: #{Rails.application.config.x.git_hash&.first(9)}", class: "social-icon" do %> <% end %> <% end %>