FIX get sub entries bug
This commit is contained in:
parent
bb98dad64c
commit
b785105730
|
@ -41,7 +41,7 @@ class RepositoriesController < ApplicationController
|
||||||
interactor = Repositories::EntriesInteractor.call(@project.owner, @project.identifier, file_path_uri, ref: @ref)
|
interactor = Repositories::EntriesInteractor.call(@project.owner, @project.identifier, file_path_uri, ref: @ref)
|
||||||
if interactor.success?
|
if interactor.success?
|
||||||
result = interactor.result
|
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 = [] << result unless result.is_a? Array
|
||||||
@sub_entries = @sub_entries.sort_by{ |hash| hash['type'] }
|
@sub_entries = @sub_entries.sort_by{ |hash| hash['type'] }
|
||||||
|
|
Loading…
Reference in New Issue