fix lint
This commit is contained in:
parent
f28d30cfc9
commit
ccac9700c0
|
@ -130,13 +130,13 @@ let timeout: number | null = null;
|
||||||
|
|
||||||
export function applyTheme(theme: Theme, persist = true) {
|
export function applyTheme(theme: Theme, persist = true) {
|
||||||
if (timeout) {
|
if (timeout) {
|
||||||
clearTimeout(timeout);
|
window.clearTimeout(timeout);
|
||||||
timeout = null;
|
timeout = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.startViewTransition != null && prefer.s.animation) {
|
if (window.document.startViewTransition != null && prefer.s.animation) {
|
||||||
window.document.documentElement.classList.add('_themeChanging_');
|
window.document.documentElement.classList.add('_themeChanging_');
|
||||||
document.startViewTransition(async () => {
|
window.document.startViewTransition(async () => {
|
||||||
applyThemeInternal(theme, persist);
|
applyThemeInternal(theme, persist);
|
||||||
await nextTick();
|
await nextTick();
|
||||||
}).finished.then(() => {
|
}).finished.then(() => {
|
||||||
|
|
Loading…
Reference in New Issue