Commit b31e017e by Ivan

fix: fix last commit

parent 902fe8d6
...@@ -42,7 +42,7 @@ module SimpleController::GroupIndex ...@@ -42,7 +42,7 @@ module SimpleController::GroupIndex
# "B"=>{nil=>[["B", nil, "pending"]]} # "B"=>{nil=>[["B", nil, "pending"]]}
# } # }
tree_result = tree_result =
if statistics.values.first.is_a?(Array) # 多于一个分组 if keys.length > 1 # 多于一个分组
process_statistics_key.call(statistics.keys, keys.size - 1) process_statistics_key.call(statistics.keys, keys.size - 1)
else # 只有一个分组 else # 只有一个分组
statistics.reduce({}) { |result, (k, v)| result.merge(k => [k])} statistics.reduce({}) { |result, (k, v)| result.merge(k => [k])}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment