Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-14 15:09:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-14 15:09:14 +0300
commit49089d4fb1f5c17328ac61c955d95a68c6d4d545 (patch)
tree309d97ce6cbc1b22935dd0e11cc72abd767ffcf3 /app/helpers/icons_helper.rb
parent846a84f2e9d6149b00c63ccae2850421f6766bac (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/icons_helper.rb')
-rw-r--r--app/helpers/icons_helper.rb10
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