mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-01 06:55:47 +02:00
refactor(client): specify global scope
This commit is contained in:
@@ -34,11 +34,11 @@ export const builtinThemes = [
|
||||
let timeout = null;
|
||||
|
||||
export function applyTheme(theme: Theme, persist = true) {
|
||||
if (timeout) clearTimeout(timeout);
|
||||
if (timeout) window.clearTimeout(timeout);
|
||||
|
||||
document.documentElement.classList.add('_themeChanging_');
|
||||
|
||||
timeout = setTimeout(() => {
|
||||
timeout = window.setTimeout(() => {
|
||||
document.documentElement.classList.remove('_themeChanging_');
|
||||
}, 1000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user