diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-14 15:09:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-14 15:09:14 +0300 |
commit | 49089d4fb1f5c17328ac61c955d95a68c6d4d545 (patch) | |
tree | 309d97ce6cbc1b22935dd0e11cc72abd767ffcf3 /app/helpers/icons_helper.rb | |
parent | 846a84f2e9d6149b00c63ccae2850421f6766bac (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/icons_helper.rb')
-rw-r--r-- | app/helpers/icons_helper.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index aeba88d4939..add15cc0d12 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -28,10 +28,12 @@ module IconsHelper end def sprite_icon_path - # SVG Sprites currently don't work across domains, so in the case of a CDN - # we have to set the current path deliberately to prevent addition of asset_host - sprite_base_url = Gitlab.config.gitlab.url if ActionController::Base.asset_host - ActionController::Base.helpers.image_path('icons.svg', host: sprite_base_url) + @sprite_icon_path ||= begin + # SVG Sprites currently don't work across domains, so in the case of a CDN + # we have to set the current path deliberately to prevent addition of asset_host + sprite_base_url = Gitlab.config.gitlab.url if ActionController::Base.asset_host + ActionController::Base.helpers.image_path('icons.svg', host: sprite_base_url) + end end def sprite_file_icons_path |