diff --git a/src/alf/util/useColorModeTheme.ts b/src/alf/util/useColorModeTheme.ts index 4f8921bf9b..c0046a2f4c 100644 --- a/src/alf/util/useColorModeTheme.ts +++ b/src/alf/util/useColorModeTheme.ts @@ -49,7 +49,9 @@ function updateDocument(theme: ThemeName) { html.className = html.className.replace(/(theme)--\w+/g, '') html.classList.add(`theme--${theme}`) // set color to 'theme-color' meta tag - meta?.setAttribute('content', getBackgroundColor(theme)) + setTimeout(() => { + meta?.setAttribute('content', getBackgroundColor(theme)) + }, 500) } }