mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 12:03:38 +08:00
correct behavior
This commit is contained in:
parent
01fcc7503a
commit
f6d56fef9e
|
@ -34,7 +34,8 @@ export default function loadScript(url, opts) {
|
|||
var cdnUrl = url;
|
||||
|
||||
if (Discourse.CDN && url[0] === "/") {
|
||||
cdnUrl = Discourse.CDN + url;
|
||||
// ensure stuff is rooted correctly
|
||||
cdnUrl = Discourse.CDN.replace(/\/$/,"") + url.substr(1);
|
||||
}
|
||||
|
||||
// Some javascript depends on the path of where it is loaded (ace editor)
|
||||
|
|
Loading…
Reference in New Issue
Block a user