diff --git a/app/assets/javascripts/discourse/lib/load-script.js.es6 b/app/assets/javascripts/discourse/lib/load-script.js.es6 index 5265e843ae5..34b723e53bf 100644 --- a/app/assets/javascripts/discourse/lib/load-script.js.es6 +++ b/app/assets/javascripts/discourse/lib/load-script.js.es6 @@ -35,7 +35,7 @@ export default function loadScript(url, opts) { if (Discourse.CDN && url[0] === "/") { // ensure stuff is rooted correctly - cdnUrl = Discourse.CDN.replace(/\/$/,"") + url.substr(1); + cdnUrl = Discourse.CDN.replace(/\/$/,"") + url; } // Some javascript depends on the path of where it is loaded (ace editor)