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:
Robin Ward 2019-12-13 15:49:46 -05:00
parent 028d21c01e
commit bc97d39688
1 changed files with 1 additions and 1 deletions

View File

@ -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>