Skip to content

Comments

fix(ui): prevent TypeError when trimming input during model switching (#5614)#5616

Merged
kevinvandijk merged 2 commits intoKilo-Org:mainfrom
EloiRamos:fix/5614-trim-undefined
Feb 3, 2026
Merged

fix(ui): prevent TypeError when trimming input during model switching (#5614)#5616
kevinvandijk merged 2 commits intoKilo-Org:mainfrom
EloiRamos:fix/5614-trim-undefined

Conversation

@EloiRamos
Copy link
Contributor

Fixes #5614.

Prevents a TypeError caused by calling .trim() on an undefined value
during model switching in ChatTextArea.

Change:

  • Replace inputValue.trim() with inputValue?.trim() ?? ""

Why safe:

  • Only affects undefined/null cases that previously crashed.
  • Preserves behavior for valid strings.
  • Minimal and localized diff.

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

🦋 Changeset detected

Latest commit: 9e139f5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kevinvandijk
Copy link
Collaborator

Thanks @EloiRamos!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

empty switch text

2 participants