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:
Kevin Decherf 2020-12-19 01:39:05 +01:00
parent ad621f198f
commit 0631f5c8d0
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