mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
FIX get sub entries bug
This commit is contained in:
@@ -41,7 +41,7 @@ class RepositoriesController < ApplicationController
|
||||
interactor = Repositories::EntriesInteractor.call(@project.owner, @project.identifier, file_path_uri, ref: @ref)
|
||||
if interactor.success?
|
||||
result = interactor.result
|
||||
return @sub_entries = [] if result[:status] == -1
|
||||
return @sub_entries = [] if result.is_a?(Hash) && result[:status] == -1
|
||||
|
||||
@sub_entries = [] << result unless result.is_a? Array
|
||||
@sub_entries = @sub_entries.sort_by{ |hash| hash['type'] }
|
||||
|
||||
Reference in New Issue
Block a user