summaryrefslogtreecommitdiff
path: root/app/helpers/tree_helper.rb
diff options
context:
space:
mode:
authorGabriel Mazetto <gabriel@gitlab.com>2015-12-15 00:53:52 -0200
committerGabriel Mazetto <gabriel@gitlab.com>2015-12-15 00:53:52 -0200
commitb5291f95996743067bbec5a32f9c6cf0d34b36c7 (patch)
tree9933fe5c9c224a175fb49fceff829b8b4441c970 /app/helpers/tree_helper.rb
parentd1f1c5c60bfd58f966671d7895c1ef612e8f8897 (diff)
downloadgitlab-ce-b5291f95996743067bbec5a32f9c6cf0d34b36c7.tar.gz
Fixed Rubocop offenses
Diffstat (limited to 'app/helpers/tree_helper.rb')
-rw-r--r--app/helpers/tree_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb
index 886a1e734b5..f448dd0ab61 100644
--- a/app/helpers/tree_helper.rb
+++ b/app/helpers/tree_helper.rb
@@ -79,7 +79,7 @@ module TreeHelper
part_path = File.join(part_path, part) unless part_path.empty?
part_path = part if part_path.empty?
- next unless parts.last(2).include?(part) if parts.count > max_links
+ next if parts.count > max_links && !parts.last(2).include?(part)
yield(part, tree_join(@ref, part_path))
end
end