From 46a72279595d17ee3bdfb062fe115c54205b6201 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 19 Oct 2015 23:04:37 +0200 Subject: [PATCH] Fixed javascript exception. --- app/assets/javascripts/app/lib/app_post/utils.coffee | 2 +- app/views/init/index.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)