summaryrefslogtreecommitdiff
path: root/packages/client/src/scripts
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2022-04-03 13:56:00 +0900
committerGitHub <noreply@github.com>2022-04-03 13:56:00 +0900
commite47a8bf666168737e7c9b00bd8330d5624c7cc60 (patch)
tree7c048fa38122de5e289b17980c85cc2699c5f770 /packages/client/src/scripts
parentfix(api): admin/update-meta was not working (diff)
downloadsharkey-e47a8bf666168737e7c9b00bd8330d5624c7cc60.tar.gz
sharkey-e47a8bf666168737e7c9b00bd8330d5624c7cc60.tar.bz2
sharkey-e47a8bf666168737e7c9b00bd8330d5624c7cc60.zip
fix theme-color apply (#8464)
Diffstat (limited to 'packages/client/src/scripts')
-rw-r--r--packages/client/src/scripts/theme.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/client/src/scripts/theme.ts b/packages/client/src/scripts/theme.ts
index 45743d0ffa..2cb78fae5c 100644
--- a/packages/client/src/scripts/theme.ts
+++ b/packages/client/src/scripts/theme.ts
@@ -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;
}
}