Skip to content

fix(updater): 修复下载更新时的私有字段错误 - #11

Merged
CodeHourra merged 1 commit into
masterfrom
feature/fix-updater-private-member
Aug 31, 2026
Merged

CodeHourra merged 1 commit into
masterfrom
feature/fix-updater-private-member

Conversation

@CodeHourra

Copy link
Copy Markdown
Owner

问题

点击下载并安装更新时提示:Cannot read private member from an object whose class did not declare it。

根因与修复

check() 返回继承自 Tauri Resource 的类实例;Vue ref() 会将其包装为深层 Proxy,导致私有字段品牌检查失败。改用 shallowRef() 保留原始实例。

验证

  • 使用真实 Tauri Resource 复现 ref 失败并验证 shallowRef 正常
  • bun run --cwd apps/desktop build 通过
  • git diff --check 通过

@CodeHourra
CodeHourra merged commit 6352291 into master Aug 31, 2026
1 check 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