Skip to content

fix: 浏览器禁用站点数据时公开页不再白屏 - #27

Merged
stqfdyr merged 1 commit into
mainfrom
fix/storage-blocked
Oct 10, 2026
Merged

stqfdyr merged 1 commit into
mainfrom
fix/storage-blocked

Conversation

@stqfdyr

@stqfdyr stqfdyr commented Oct 10, 2026

Copy link
Copy Markdown
Contributor
  • 读写 localStorage 包了 try/catch:浏览器对站点禁用数据时访问它会抛 SecurityError,改前公开页整页空白。读不到当作没存过,切换主题仍然生效,只是关掉页面后不保留。
  • 实测:Playwright 注入 localStorage 访问抛错,改前 body 为空、一条 pageerror;改后正常渲染,点切换主题后 dark 类随之变化。

@stqfdyr
stqfdyr merged commit 0a0a57d into main Oct 10, 2026
1 check passed
@stqfdyr
stqfdyr deleted the fix/storage-blocked branch October 10, 2026 12:43
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