From fc47b60d1bd1a2ea9b2bf8bd637a97ccecf0cfb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Thu, 16 Apr 2026 22:56:34 -0400 Subject: [PATCH] refactor(approval-policy): normalize decisionNote into single local --- src/main/approval-policy.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/approval-policy.ts b/src/main/approval-policy.ts index 773c4b0c..6cf11e3e 100644 --- a/src/main/approval-policy.ts +++ b/src/main/approval-policy.ts @@ -28,11 +28,12 @@ export function resolveApprovalDecision({ detail?: string | null; actor?: string; }) { + const note = decisionNote ?? ""; db.decideApproval({ companyId, approvalId, state, - decisionNote: decisionNote ?? "", + decisionNote: note, }); db.addActivity({ companyId, @@ -40,7 +41,7 @@ export function resolveApprovalDecision({ action: `approval.${state}`, entityType: "approval", entityId: approvalId, - detail: detail ?? decisionNote ?? "", + detail: detail ?? note, }); handleApprovalResolved(approvalId, companyId, state); }