There was an error while loading. Please reload this page.
1 parent ff1140f commit b0b699eCopy full SHA for b0b699e
packages/chat-component/src/utils/index.ts
@@ -46,7 +46,7 @@ export function processText(inputText: string, arrays: Array<Array<string> | Arr
46
47
// Determine which regex to use, depending if the indicator is present
48
const nextRegex = hasNextQuestions ? findNextQuestions : findQuestionsbyDoubleArrow;
49
- const nextQuestionsMatch = replacedText.match(nextRegex);
+ const nextQuestionsMatch = replacedText.match(nextRegex) ?? [];
50
let nextQuestions: string[] = [];
51
nextQuestions = cleanUpFollowUp([...(nextQuestionsMatch as string[])]);
52
0 commit comments