Commit d2cfcb3e authored by Lin Jen-Shin's avatar Lin Jen-Shin
parent 1e49a8bc
...@@ -132,9 +132,8 @@ module Gitlab ...@@ -132,9 +132,8 @@ module Gitlab
end end
def process_periods(periods) def process_periods(periods)
if periods.empty? return periods if periods.empty?
periods
else
periods.drop(1).inject([periods.first]) do |result, current| periods.drop(1).inject([periods.first]) do |result, current|
merged = try_merge_period(result.last, current) merged = try_merge_period(result.last, current)
...@@ -146,7 +145,6 @@ module Gitlab ...@@ -146,7 +145,6 @@ module Gitlab
end end
end end
end end
end
def try_merge_period(previous, current) def try_merge_period(previous, current)
if current.first <= previous.last if current.first <= previous.last
......
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