(AppComponent) Small tweak for IE11 compatibility

This commit is contained in:
Sercan Yemen 2018-08-27 20:36:27 +03:00
parent c4e338cda1
commit d8782a78d5

View File

@ -138,13 +138,16 @@ export class AppComponent implements OnInit, OnDestroy
this.document.body.classList.remove('boxed');
}
// Color theme
this.document.body.classList.forEach(className => {
// Color theme - Use normal for loop for IE11 compatibility
for ( let i = 0; i < this.document.body.classList.length; i++ )
{
const className = this.document.body.classList[i];
if ( className.startsWith('theme-') )
{
this.document.body.classList.remove(className);
}
});
}
this.document.body.classList.add(this.fuseConfig.colorTheme);
});