0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

[ci] format

This commit is contained in:
liruifengv 2024-04-10 10:59:24 +00:00 committed by astrobot-houston
parent e2cd7f4291
commit ba3af206b5

View file

@ -600,7 +600,8 @@ class ErrorOverlay extends HTMLElement {
themeToggle!.checked = false; themeToggle!.checked = false;
} }
themeToggle?.addEventListener('click', () => { themeToggle?.addEventListener('click', () => {
const isDark = localStorage.astroErrorOverlayTheme === 'dark' || this?.classList.contains('astro-dark'); const isDark =
localStorage.astroErrorOverlayTheme === 'dark' || this?.classList.contains('astro-dark');
this?.classList.toggle('astro-dark', !isDark); this?.classList.toggle('astro-dark', !isDark);
localStorage.astroErrorOverlayTheme = isDark ? 'light' : 'dark'; localStorage.astroErrorOverlayTheme = isDark ? 'light' : 'dark';
}); });