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