Skip to content

Commit

Permalink
entries in cv.Config.configSettings.stylesToLoad
Browse files Browse the repository at this point in the history
can be objects {uri: string, media: string}.
Replace in obj.uri in that case

closes #1361
  • Loading branch information
peuter committed Aug 13, 2023
1 parent e267658 commit 6b28a85
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions source/class/cv/Application.js
Expand Up @@ -839,9 +839,14 @@ qx.Class.define('cv.Application', {
// we have to replace the cached design scripts styles to load
const styles = [];
cv.Config.configSettings.stylesToLoad.forEach(function (style) {
styles.push(
style.replace('designs/' + cv.Config.configSettings.clientDesign, 'designs/' + cv.Config.clientDesign)
);
if (typeof style === 'string') {
styles.push(
style.replace('designs/' + cv.Config.configSettings.clientDesign, 'designs/' + cv.Config.clientDesign)
);
} else if (typeof style === 'object' && style.uri) {
style.uri = style.uri.replace('designs/' + cv.Config.configSettings.clientDesign, 'designs/' + cv.Config.clientDesign);
styles.push(style);
}
}, this);
this.loadStyles(styles);

Expand Down

0 comments on commit 6b28a85

Please sign in to comment.