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;