From ef3a95ba39f8d276be79dd846a40feaf85adea37 Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Tue, 30 Jun 2020 11:27:29 +0800 Subject: [PATCH] change entryes --- app/controllers/repositories_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index f33cdb799..1af1e6188 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -28,7 +28,7 @@ class RepositoriesController < ApplicationController @project.increment!(:visits) @project_owner = @project.owner @entries = Gitea::Repository::Entries::ListService.new(@project_owner, @project.identifier, ref: @ref).call - @entries = @entries.sort_by{ |hash| hash['type'] } + @entries = @entries.sort_by{ |hash| hash['type'] } if @entries.present? @path = Gitea.gitea_config[:domain]+"/#{@project.owner.login}/#{@project.identifier}/raw/branch/#{@ref}/" end