FIX: Allow IE script to load with a CDN
A proper fix would involve it being precompiled like other assets, but due to the conditional nature of the resource this is more complicated. For now this is better than IE being broken.
This commit is contained in:
parent
028d21c01e
commit
bc97d39688
|
@ -47,7 +47,7 @@ after_initialize do
|
|||
# to be loaded before other files
|
||||
register_html_builder('server:before-script-load') do |controller|
|
||||
if BrowserDetection.browser(controller.request.env['HTTP_USER_AGENT']) == :ie
|
||||
path = controller.helpers.script_asset_path('/plugins/discourse-internet-explorer/js/ie')
|
||||
path = "#{Discourse.base_uri}/plugins/discourse-internet-explorer/js/ie.js"
|
||||
|
||||
<<~JAVASCRIPT
|
||||
<script src="#{path}"></script>
|
||||
|
|
Loading…
Reference in New Issue