From bc97d39688af36a5dc527ed9125f03b74cfc6b5c Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 13 Dec 2019 15:49:46 -0500 Subject: [PATCH] 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. --- plugins/discourse-internet-explorer/plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/discourse-internet-explorer/plugin.rb b/plugins/discourse-internet-explorer/plugin.rb index 5f80a79ad3b..0e97cf4cbd6 100644 --- a/plugins/discourse-internet-explorer/plugin.rb +++ b/plugins/discourse-internet-explorer/plugin.rb @@ -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