Commit a8a8968
fix(ssr): guard localStorage in useState initializers to fix static build
useState lazy initializers run during Next.js server-side rendering (even
in 'use client' components), causing ReferenceError: localStorage is not
defined during static page generation for the YAML utility page.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 4acd512 commit a8a8968
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
0 commit comments