diff --git a/app/assets/javascripts/app/lib/app_post/utils.coffee b/app/assets/javascripts/app/lib/app_post/utils.coffee index d113687a8..b11168bb4 100644 --- a/app/assets/javascripts/app/lib/app_post/utils.coffee +++ b/app/assets/javascripts/app/lib/app_post/utils.coffee @@ -594,7 +594,7 @@ class App.Utils num @icon: (name, className = '') -> - path = if svgPolyfill then '' else 'assets/images/icons.svg' + path = if window.svgPolyfill then '' else 'assets/images/icons.svg' "" @getScrollBarWidth: -> diff --git a/app/views/init/index.html.erb b/app/views/init/index.html.erb index 69595b00a..6d69303b9 100644 --- a/app/views/init/index.html.erb +++ b/app/views/init/index.html.erb @@ -9,7 +9,7 @@ - Edge 12 - IE 9-11 */ - var svgPolyfill = /\bEdge\/12\b|\bTrident\/[567]\b|\bVersion\/7.0 Safari\b/.test(navigator.userAgent) || (navigator.userAgent.match(/AppleWebKit\/(\d+)/) || [])[1] < 537; + window.svgPolyfill = /\bEdge\/12\b|\bTrident\/[567]\b|\bVersion\/7.0 Safari\b/.test(navigator.userAgent) || (navigator.userAgent.match(/AppleWebKit\/(\d+)/) || [])[1] < 537; (function (doc) { if(!svgPolyfill)