diff options
author | Mark Chao <mchao@gitlab.com> | 2019-03-21 16:38:52 +0300 |
---|---|---|
committer | Mark Chao <mchao@gitlab.com> | 2019-03-21 18:08:29 +0300 |
commit | 8723f292552814cfe4566f213005e4e190fca456 (patch) | |
tree | 22b2a5bc1188ae7467d12c9e640fc1998a020741 /app/serializers | |
parent | 8a59c9fdba4572cdfd60be6630d96fd37dc35654 (diff) |
Fix diff bottom expand button appears twice
This is a quick fix by only append match line once
when calling diff_lines_for_serializer multiple time.
Also enable feature by default
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/diff_file_entity.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/diff_file_entity.rb b/app/serializers/diff_file_entity.rb index 13711070a46..066e30cd3bb 100644 --- a/app/serializers/diff_file_entity.rb +++ b/app/serializers/diff_file_entity.rb @@ -57,7 +57,7 @@ class DiffFileEntity < DiffFileBaseEntity diff_file.diff_lines_for_serializer end - expose :is_fully_expanded, if: -> (diff_file, _) { Feature.enabled?(:expand_diff_full_file) && diff_file.text? } do |diff_file| + expose :is_fully_expanded, if: -> (diff_file, _) { Feature.enabled?(:expand_diff_full_file, default_enabled: true) && diff_file.text? } do |diff_file| diff_file.fully_expanded? end |