Merge pull request #4866 from wallabag/fix/4812/dark-theme-cookie

material: fix issue with cookie check for light/dark theme
This commit is contained in:
Nicolas Lœuillet
2020-12-21 08:53:51 +01:00
committed by GitHub
3 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ function darkTheme() {
}, },
exists() { exists() {
return document.cookie.split(';').map((cookie) => cookie.split('=')).filter((cookie) => cookie[0] === 'theme').length; return document.cookie.split(';').some((cookie) => cookie.trim().startsWith(`${this.name}=`));
}, },
}; };
const preferedColorScheme = { const preferedColorScheme = {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long