This commit is contained in:
かっこかり 2025-05-08 11:56:27 +09:00 committed by GitHub
parent f28d30cfc9
commit ccac9700c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -130,13 +130,13 @@ let timeout: number | null = null;
export function applyTheme(theme: Theme, persist = true) {
if (timeout) {
clearTimeout(timeout);
window.clearTimeout(timeout);
timeout = null;
}
if (document.startViewTransition != null && prefer.s.animation) {
if (window.document.startViewTransition != null && prefer.s.animation) {
window.document.documentElement.classList.add('_themeChanging_');
document.startViewTransition(async () => {
window.document.startViewTransition(async () => {
applyThemeInternal(theme, persist);
await nextTick();
}).finished.then(() => {