From 5832cbbe9cc570cd69f47e0b7df246eaa70da4ee Mon Sep 17 00:00:00 2001 From: m4 Date: Sat, 19 Sep 2026 22:59:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(desktop):=20DB-T6=20recordBind=20=E6=94=B6?= =?UTF-8?q?=E7=AA=84=E6=94=B9=E5=86=99=E2=80=94=E2=80=94TS=206.0.3=20?= =?UTF-8?q?=E5=AF=B9=E5=B8=83=E5=B0=94=E5=88=A4=E5=88=AB=E5=BC=8F=E7=9C=9F?= =?UTF-8?q?=E5=80=BC=E6=94=B6=E7=AA=84=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 改显式 === 比较;门禁补 tsconfig.electron.json(根 tsconfig 不覆盖 electron/)。 Co-Authored-By: Claude Opus 4.7 --- apps/desktop/electron/user-account-ipc.ts | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/apps/desktop/electron/user-account-ipc.ts b/apps/desktop/electron/user-account-ipc.ts index 273032a386..ea68eb9521 100644 --- a/apps/desktop/electron/user-account-ipc.ts +++ b/apps/desktop/electron/user-account-ipc.ts @@ -357,25 +357,19 @@ export function registerUserAccountIpc(deps: UserAccountIpcDeps): void { } function recordBind(result: Awaited>): void { - if (!result.ok && result.code === 'already_bound') { + if (result.ok === false) { + lastBind = result.code === 'already_bound' ? null : { error: result.code } + + return + } + + if (result.state === 'bound') { lastBind = null return } - if (result.ok && result.state === 'bound') { - lastBind = null - - return - } - - if (result.ok) { - lastBind = { pending: { code: result.code, expiresAt: result.expiresAt } } - - return - } - - lastBind = { error: result.code } + lastBind = { pending: { code: result.code, expiresAt: result.expiresAt } } } /**