fix(web): coerce chat composer draft to string (input.trim crash)
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled
ci / web (push) Has been cancelled
Desktop App / Build Linux (amd64) (push) Has been cancelled
Desktop App / Attach to Release (push) Has been cancelled

The Send button's disabled={!input.trim()} threw "trim is not a function" when
input was initialized from a non-string initialDraft (a Svelte 5 prop-init edge
where a null/undefined draft reached $state). Coerce at init so the composer
state is always a string.

VERSION: 0.15.0 -> 0.15.1
This commit is contained in:
2026-08-03 16:00:01 +02:00
parent 39e9227fdb
commit b27e1bf3ec
2 changed files with 2 additions and 2 deletions

View File

@@ -1 +1 @@
0.15.0
0.15.1

View File

@@ -58,7 +58,7 @@
initialDraft?: string
} = $props()
let input = $state(initialDraft)
let input = $state(typeof initialDraft === 'string' ? initialDraft : '')
let messagesEnd = $state<HTMLDivElement | null>(null)
let scrolledUp = $state(false)
let container = $state<HTMLDivElement | null>(null)