mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 02:53:08 +02:00
fix theme-color apply (#8464)
This commit is contained in:
parent
408d54f2eb
commit
e47a8bf666
1 changed files with 2 additions and 2 deletions
|
@ -51,14 +51,14 @@ export function applyTheme(theme: Theme, persist = true) {
|
|||
|
||||
if (_theme.base) {
|
||||
const base = [lightTheme, darkTheme].find(x => x.id === _theme.base);
|
||||
_theme.props = Object.assign({}, base.props, _theme.props);
|
||||
if (base) _theme.props = Object.assign({}, base.props, _theme.props);
|
||||
}
|
||||
|
||||
const props = compile(_theme);
|
||||
|
||||
for (const tag of document.head.children) {
|
||||
if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') {
|
||||
tag.setAttribute('content', props['html']);
|
||||
tag.setAttribute('content', props['htmlThemeColor']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue