From e8fc479b10360b6238616a0f51d11c0b8e539661 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 19:12:48 +0000 Subject: [PATCH] Fix duplicate variable declaration --- supabase/functions/process-selective-approval/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supabase/functions/process-selective-approval/index.ts b/supabase/functions/process-selective-approval/index.ts index 4220d81f..9c053f31 100644 --- a/supabase/functions/process-selective-approval/index.ts +++ b/supabase/functions/process-selective-approval/index.ts @@ -692,7 +692,7 @@ serve(withRateLimit(async (req) => { } // ✅ CLEANUP: Delete temporary references for approved items - const approvedItemIds = approvalResults.filter(r => r.success).map(r => r.itemId); + // Reuse approvedItemIds from line 663 - already computed if (approvedItemIds.length > 0) { try { const { error: cleanupError } = await supabase