X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fcore%2Ftheme%2Ftheme.service.ts;h=ac34689419df7a271cb7edc05ace477904083e85;hb=0882c8e6509b2a4ea48f6c48ecb2aa4aa371500a;hp=c355487980385eae7ef9c3e6c15bc658d9b32ff1;hpb=72f611ca1549d711f8cbf5dd08a3f1562a32fabb;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/core/theme/theme.service.ts b/client/src/app/core/theme/theme.service.ts index c35548798..ac3468941 100644 --- a/client/src/app/core/theme/theme.service.ts +++ b/client/src/app/core/theme/theme.service.ts @@ -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()) }