mirror of https://github.com/wallabag/wallabag.git
material: fix issue with cookie check for light/dark theme
Fixes #4812 Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
parent
ad621f198f
commit
0631f5c8d0
|
@ -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
Loading…
Reference in New Issue