diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-23 18:09:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-23 18:09:46 +0000 |
commit | fdd0b0fd4592c74257980d07878db75705d22192 (patch) | |
tree | fcf923555aed86fea3842f1074ec45d2864db20c /lib/api/helpers/snippets_helpers.rb | |
parent | 9a9415ab127d5e660c09113238a6fb0a895218e9 (diff) | |
download | gitlab-ce-fdd0b0fd4592c74257980d07878db75705d22192.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/helpers/snippets_helpers.rb')
-rw-r--r-- | lib/api/helpers/snippets_helpers.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/helpers/snippets_helpers.rb b/lib/api/helpers/snippets_helpers.rb index 6ca3086d934..20aeca6a9d3 100644 --- a/lib/api/helpers/snippets_helpers.rb +++ b/lib/api/helpers/snippets_helpers.rb @@ -4,12 +4,12 @@ module API module Helpers module SnippetsHelpers def content_for(snippet) - if ::Feature.enabled?(:version_snippets, current_user) && !snippet.empty_repo? + if snippet.empty_repo? + snippet.content + else blob = snippet.blobs.first blob.load_all_data! blob.data - else - snippet.content end end end |