[Trunk | Connect]: customization.component.ts: Check if document is undefined and return in 'buildCss()' method.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@57425 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
2032202fab
commit
164e4fc127
|
@ -58,6 +58,9 @@ export class CustomizationComponent {
|
|||
}
|
||||
|
||||
private buildCss() {
|
||||
if(typeof document === 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
document.documentElement.style.setProperty('--portal-main-color', this.layout.mainColor);
|
||||
document.documentElement.style.setProperty('--portal-dark-color', this.layout.secondaryColor);
|
||||
|
@ -230,7 +233,7 @@ export class CustomizationComponent {
|
|||
}
|
||||
|
||||
|
||||
`
|
||||
`;
|
||||
css = css.concat(css1);
|
||||
appendCss(css);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue