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
commit 2267453d1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ function darkTheme() {
},
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 = {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long