Skip to content

Website: fix the hardware page not loading with a stored theme - #2516

Merged
alexey-milovidov merged 1 commit into
mainfrom
hardware-fix-stored-theme
Oct 10, 2026
Merged

alexey-milovidov merged 1 commit into
mainfrom
hardware-fix-stored-theme

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

When the theme is stored in localStorage (e.g. after choosing the dark theme), the hardware page failed to load with ReferenceError: Cannot access 'pending_details' before initialization: setTheme() called render() before the let pending_details declaration (introduced in ac177c8 "Website: make switching selectors fast").

Apply the stored theme without rendering, as the main page already does; the initial render runs at the end of the script.

Verified in headless Chromium with a stored dark theme: hardware, main, versions and gravitons pages all render, and theme toggling works.

🤖 Generated with Claude Code

When the theme was saved in localStorage, setTheme() called render() at load,
before 'let pending_details' was initialized, throwing a ReferenceError and
leaving the page empty. Apply the stored theme without rendering, as the main
page does; the initial render runs at the end anyway.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@alexey-milovidov alexey-milovidov self-assigned this Oct 10, 2026
@alexey-milovidov
alexey-milovidov merged commit f5ae805 into main Oct 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant