fix: share init error (#2690)

This commit is contained in:
Archer
2024-09-12 18:04:31 +08:00
committed by shilin66
parent 7c0a59d980
commit 146854160a
4 changed files with 13 additions and 27 deletions

View File

@@ -18,6 +18,8 @@ export function transformPreviewHistories(histories: ChatItemType[]) {
export function addStatisticalDataToHistoryItem(historyItem: ChatItemType) {
if (historyItem.obj !== ChatRoleEnum.AI) return historyItem;
if (historyItem.totalQuoteList !== undefined) return historyItem;
// Flat children
const flatResData: ChatHistoryItemResType[] =
historyItem.responseData
?.map((item) => {