large update

This commit is contained in:
ZacharyZhang-NY committed 2026-03-29 14:08:15 -04:00
1 parent 2ed952f19c
commit 65e85135c1
111 files changed
+3936 -2933

No files matched your search

+6 -7
View File
@@ -29,13 +29,12 @@ export function createBrowserActionService({
throw new Error(`Browser action ${actionId} is ${action.status} and cannot be dispatched.`);
}
if (action.approvalId) {
const approval = (() => {
try {
return db.getApprovalRecord(action.approvalId);
} catch {
return null;
}
})();
let approval: ReturnType<typeof db.getApprovalRecord> | null = null;
try {
approval = db.getApprovalRecord(action.approvalId);
} catch {
// Record not found
}
if (!approval || approval.companyId !== companyId) {
throw new Error(`Browser action approval ${action.approvalId} does not belong to company ${companyId}.`);
}