From b870c5869562173fd5d8a1395b11d80bf0c5ee69 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 17 Jan 2026 12:45:54 +0100 Subject: [PATCH] Fix let/const for newTools - let where reassigned, const where mutated Co-Authored-By: Claude Opus 4.5 --- src/components/admin/ToolsEditor.tsx | 2 +- src/components/admin/create-order-dialog.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/admin/ToolsEditor.tsx b/src/components/admin/ToolsEditor.tsx index 2201a13..d73b7aa 100644 --- a/src/components/admin/ToolsEditor.tsx +++ b/src/components/admin/ToolsEditor.tsx @@ -132,7 +132,7 @@ export function ToolsEditor({ tools, onSave, isEditable, isSaving = false }: Too setSelectedTools((prev) => { if (prev.includes(tool)) { // Removing a tool - also remove tools that depend on it - const newTools = prev.filter((t) => t !== tool) + let newTools = prev.filter((t) => t !== tool) // If removing gitea, also remove gitea-drone if (tool === 'gitea') { newTools = newTools.filter((t) => t !== 'gitea-drone') diff --git a/src/components/admin/create-order-dialog.tsx b/src/components/admin/create-order-dialog.tsx index 8d62de8..f6b0612 100644 --- a/src/components/admin/create-order-dialog.tsx +++ b/src/components/admin/create-order-dialog.tsx @@ -242,7 +242,7 @@ export function CreateOrderDialog({ setSelectedTools((prev) => { if (prev.includes(tool)) { // Removing a tool - also remove tools that depend on it - const newTools = prev.filter((t) => t !== tool) + let newTools = prev.filter((t) => t !== tool) // If removing gitea, also remove gitea-drone if (tool === 'gitea') { newTools = newTools.filter((t) => t !== 'gitea-drone')