From d8782a78d5d307c0ed0b1f5994882b48915f7ddb Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Mon, 27 Aug 2018 20:36:27 +0300 Subject: [PATCH] (AppComponent) Small tweak for IE11 compatibility --- src/app/app.component.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index b3451842..def0a0fd 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -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); });