From 1daec473121791c6e35b8e794a2528ee9e65eacf Mon Sep 17 00:00:00 2001 From: dlohvinov Date: Fri, 22 Nov 2024 13:06:49 +0200 Subject: [PATCH] fix: catalog client chat history [WTEL-5515](https://webitel.atlassian.net/browse/WTEL-5515) --- package.json | 2 +- src/api/clients/catalog/catalog.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 193e38b93..70acfdf06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@webitel/ui-sdk", - "version": "24.12.3", + "version": "24.12.4", "private": false, "scripts": { "dev": "vite", diff --git a/src/api/clients/catalog/catalog.js b/src/api/clients/catalog/catalog.js index e20bb4c0d..7abe22278 100644 --- a/src/api/clients/catalog/catalog.js +++ b/src/api/clients/catalog/catalog.js @@ -15,6 +15,7 @@ const catalogService = new CatalogApiFactory(configuration, '', instance); const getChatMessagesList = async ({ chatId }) => { const mergeMessagesData = ({ messages, peers }) => { + if (!messages) return []; return messages.map(({ from, ...message }) => { return { ...message,