fix(pitch-deck): fix ReferenceError in ChatFAB breaking 2nd message
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m4s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 32s
CI / test-python-voice (push) Successful in 28s
CI / test-bqas (push) Successful in 28s
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m4s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 32s
CI / test-python-voice (push) Successful in 28s
CI / test-bqas (push) Successful in 28s
faqMatch (undefined) → faqMatches[0]. The undefined variable caused a ReferenceError after streaming completed, which the catch block turned into "Verbindung fehlgeschlagen" for every subsequent message. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -286,10 +286,11 @@ export default function ChatFAB({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If FAQ matched and has a goto_slide, add a GOTO marker to the response
|
// If FAQ matched and has a goto_slide, add a GOTO marker to the response
|
||||||
if (faqMatch?.goto_slide) {
|
const topMatch = faqMatches[0]
|
||||||
const gotoIdx = SLIDE_ORDER.indexOf(faqMatch.goto_slide)
|
if (topMatch?.goto_slide) {
|
||||||
|
const gotoIdx = SLIDE_ORDER.indexOf(topMatch.goto_slide)
|
||||||
if (gotoIdx >= 0) {
|
if (gotoIdx >= 0) {
|
||||||
const suffix = `\n\n[GOTO:${faqMatch.goto_slide}]`
|
const suffix = `\n\n[GOTO:${topMatch.goto_slide}]`
|
||||||
content += suffix
|
content += suffix
|
||||||
setMessages(prev => {
|
setMessages(prev => {
|
||||||
const updated = [...prev]
|
const updated = [...prev]
|
||||||
|
|||||||
Reference in New Issue
Block a user