mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-25 23:01:12 +03:00
minor convert chat history to text empty array fix
This commit is contained in:
@@ -533,7 +533,7 @@ export const mapChatHistory = (options: ICommonObject): ChatMessageHistory => {
|
||||
* @param {IMessage[]} chatHistory
|
||||
* @returns {string}
|
||||
*/
|
||||
export const convertChatHistoryToText = (chatHistory: IMessage[]): string => {
|
||||
export const convertChatHistoryToText = (chatHistory: IMessage[] = []): string => {
|
||||
return chatHistory
|
||||
.map((chatMessage) => {
|
||||
if (chatMessage.type === 'apiMessage') {
|
||||
|
||||
Reference in New Issue
Block a user