From 3018eaa7da0adf83c123da1f1a3d015c93acf376 Mon Sep 17 00:00:00 2001 From: Hamish Peebles Date: Wed, 11 Dec 2024 15:16:57 +0000 Subject: [PATCH] `let` -> `const` (#7041) --- frontend/openchat-client/src/utils/chat.ts | 2 +- frontend/openchat-shared/src/domain/commands.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/openchat-client/src/utils/chat.ts b/frontend/openchat-client/src/utils/chat.ts index 207a763c07..7c305bc9f0 100644 --- a/frontend/openchat-client/src/utils/chat.ts +++ b/frontend/openchat-client/src/utils/chat.ts @@ -1489,7 +1489,7 @@ export function mergeEventsAndLocalUpdates( if (unconfirmed.length > 0) { unconfirmed.sort(sortByTimestampThenEventIndex); - let unconfirmedAdded = new Set(); + const unconfirmedAdded = new Set(); for (const message of unconfirmed) { // Only include unconfirmed events that are either contiguous with the loaded confirmed events, or are the // first events in a new chat diff --git a/frontend/openchat-shared/src/domain/commands.ts b/frontend/openchat-shared/src/domain/commands.ts index b912927c4a..bf29293ed2 100644 --- a/frontend/openchat-shared/src/domain/commands.ts +++ b/frontend/openchat-shared/src/domain/commands.ts @@ -337,7 +337,7 @@ function validateCommand( errors: ValidationErrors, ): boolean { let valid = true; - let nameErrors = validBotComponentName(command.name); + const nameErrors = validBotComponentName(command.name); if (nameErrors.length > 0) { errors.addErrors(`${errorPath}_name`, nameErrors); valid = false; @@ -374,7 +374,7 @@ function validateParameter( errors: ValidationErrors, ): boolean { let valid = true; - let nameErrors = validBotComponentName(param.name); + const nameErrors = validBotComponentName(param.name); if (nameErrors.length > 0) { errors.addErrors(`${errorPath}_name`, nameErrors); valid = false;