Fix let/const for newTools - let where reassigned, const where mutated
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -132,7 +132,7 @@ export function ToolsEditor({ tools, onSave, isEditable, isSaving = false }: Too
|
|||||||
setSelectedTools((prev) => {
|
setSelectedTools((prev) => {
|
||||||
if (prev.includes(tool)) {
|
if (prev.includes(tool)) {
|
||||||
// Removing a tool - also remove tools that depend on it
|
// 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 removing gitea, also remove gitea-drone
|
||||||
if (tool === 'gitea') {
|
if (tool === 'gitea') {
|
||||||
newTools = newTools.filter((t) => t !== 'gitea-drone')
|
newTools = newTools.filter((t) => t !== 'gitea-drone')
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ export function CreateOrderDialog({
|
|||||||
setSelectedTools((prev) => {
|
setSelectedTools((prev) => {
|
||||||
if (prev.includes(tool)) {
|
if (prev.includes(tool)) {
|
||||||
// Removing a tool - also remove tools that depend on it
|
// 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 removing gitea, also remove gitea-drone
|
||||||
if (tool === 'gitea') {
|
if (tool === 'gitea') {
|
||||||
newTools = newTools.filter((t) => t !== 'gitea-drone')
|
newTools = newTools.filter((t) => t !== 'gitea-drone')
|
||||||
|
|||||||
Reference in New Issue
Block a user