diff options
Diffstat (limited to 'app/presenters/snippet_presenter.rb')
-rw-r--r-- | app/presenters/snippet_presenter.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/app/presenters/snippet_presenter.rb b/app/presenters/snippet_presenter.rb index d814c4404b6..695aa266e2c 100644 --- a/app/presenters/snippet_presenter.rb +++ b/app/presenters/snippet_presenter.rb @@ -32,15 +32,9 @@ class SnippetPresenter < Gitlab::View::Presenter::Delegated end def blob - blobs.first - end + return snippet.blob if snippet.empty_repo? - def blobs - if snippet.empty_repo? - [snippet.blob] - else - snippet.blobs - end + blobs.first end private |