mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 09:57:25 +08:00
FIX: colors picker not working with CDN
This commit is contained in:
@ -63,7 +63,8 @@ export default function loadScript(url, opts) {
|
|||||||
var cdnUrl = url;
|
var cdnUrl = url;
|
||||||
|
|
||||||
// Scripts should always load from CDN
|
// Scripts should always load from CDN
|
||||||
if (Discourse.CDN && url[0] === "/" && url[1] !== "/") {
|
// CSS is type text, to accept it from a CDN we would need to handle CORS
|
||||||
|
if (!opts.css && Discourse.CDN && url[0] === "/" && url[1] !== "/") {
|
||||||
cdnUrl = Discourse.CDN.replace(/\/$/,"") + url;
|
cdnUrl = Discourse.CDN.replace(/\/$/,"") + url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user