Astro Info
Astro v4.5.12
Node v18.16.1
System Windows (x64)
Package Manager npm
Output server
Adapter @astrojs/node
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Issue
The errorOverlay's themeSwitch does not work as expected.
How to reproduce
Prerequisites
User's system use dark mode
When the user first encounters the error page, open the errorOverlay.
No localstorage astroErrorOverlayTheme now.
Steps
open the errorOverlay
theme is detected as dark
Click the themeSwitch
themeSwitch's check status is wrong
theme toggle also does not work
Video
astro-error-overlay.-.Compressed.with.FlexClip.mp4
Reason
When it is detected that the system is dark, it is not saved to localstorage.
isDark should be localStorage.astroErrorOverlayTheme === 'dark' || this?.classList.contains('astro-dark')
What's the expected result?
errorOverlay's themeSwitch works correctly
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-xx2wzh
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Issue
The errorOverlay's themeSwitch does not work as expected.
How to reproduce
Prerequisites
astroErrorOverlayThemenow.Steps
Video
astro-error-overlay.-.Compressed.with.FlexClip.mp4
Reason
isDarkshould belocalStorage.astroErrorOverlayTheme === 'dark' || this?.classList.contains('astro-dark')What's the expected result?
errorOverlay's themeSwitch works correctly
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-xx2wzh
Participation