From ab929cb93ed964ee6a46081b3f8bf27979054bbb Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Mon, 6 Oct 2014 19:55:15 +0600 Subject: [PATCH] fix error with empty commit --- app/views/projects/base/_layout.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/projects/base/_layout.html.haml b/app/views/projects/base/_layout.html.haml index a91d2374a..8fb0be0d1 100644 --- a/app/views/projects/base/_layout.html.haml +++ b/app/views/projects/base/_layout.html.haml @@ -2,9 +2,10 @@ = render 'repo_block', project: @project = render 'about_block', project: @project -%h3= t("layout.projects.last_commit") -- GitPresenters::CommitAsMessagePresenter.present(@commit, project: @project) do |presenter| - = render 'shared/feed_message', presenter: presenter, item_no: 1 +- if @commit.present? + %h3= t("layout.projects.last_commit") + - GitPresenters::CommitAsMessagePresenter.present(@commit, project: @project) do |presenter| + = render 'shared/feed_message', presenter: presenter, item_no: 1 .both