FIX: colors picker not working with CDN

This commit is contained in:
Sam 2017-04-20 11:04:23 -04:00
parent e119c6e01e
commit 8628a57f4e
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ export default function loadScript(url, opts) {
var cdnUrl = url;
// 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;
}