]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/theme/theme.service.ts
Merge branch 'release/4.0.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / core / theme / theme.service.ts
index c355487980385eae7ef9c3e6c15bc658d9b32ff1..ac34689419df7a271cb7edc05ace477904083e85 100644 (file)
@@ -95,8 +95,8 @@ export class ThemeService {
   private loadTheme (name: string) {
     const links = document.getElementsByTagName('link')
     for (let i = 0; i < links.length; i++) {
-      const link = links[ i ]
-      if (link.getAttribute('rel').indexOf('style') !== -1 && link.getAttribute('title')) {
+      const link = links[i]
+      if (link.getAttribute('rel').includes('style') && link.getAttribute('title')) {
         link.disabled = link.getAttribute('title') !== name
       }
     }
@@ -141,7 +141,6 @@ export class ThemeService {
     }
 
     this.auth.userInformationLoaded
-      .pipe(first())
       .subscribe(() => this.updateCurrentTheme())
   }