mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
FIX code bug
This commit is contained in:
@@ -43,7 +43,7 @@ class RepositoriesController < ApplicationController
|
||||
result = interactor.result
|
||||
return @sub_entries = [] if result.is_a?(Hash) && result[:status] == -1
|
||||
|
||||
@sub_entries = [] << result unless result.is_a? Array
|
||||
@sub_entries = result.is_a?(Array) ? result : [result]
|
||||
@sub_entries = @sub_entries.sort_by{ |hash| hash['type'] }
|
||||
else
|
||||
render_error(interactor.error)
|
||||
|
||||
Reference in New Issue
Block a user