From 85dba1f5f4ae1ae263b5e9f5bb4d20cc986f05cb Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 3 Apr 2022 13:56:00 +0900 Subject: [PATCH] fix theme-color apply (#8464) --- packages/client/src/scripts/theme.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/src/scripts/theme.ts b/packages/client/src/scripts/theme.ts index 45743d0ff..2cb78fae5 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; } }