From 51e0754ade67318fe698b517471d1a90b9342fa0 Mon Sep 17 00:00:00 2001 From: "1808837298@qq.com" <1808837298@qq.com> Date: Tue, 21 May 2024 19:57:50 +0800 Subject: [PATCH] fix: log page error (close #270) --- web/src/components/LogsTable.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/src/components/LogsTable.js b/web/src/components/LogsTable.js index f8436ad..d94eb60 100644 --- a/web/src/components/LogsTable.js +++ b/web/src/components/LogsTable.js @@ -302,6 +302,9 @@ const LogsTable = () => { let content = '渠道:' + record.channel; if (record.other !== '') { let other = JSON.parse(record.other); + if (other === null) { + return <> + } if (other.admin_info !== undefined) { if ( other.admin_info.use_channel !== null && @@ -322,7 +325,8 @@ const LogsTable = () => { title: '详情', dataIndex: 'content', render: (text, record, index) => { - if (record.other === '') { + let other = JSON.parse(record.other); + if (other == null) { return ( { ); } - let other = JSON.parse(record.other); let content = renderModelPrice( record.prompt_tokens, record.completion_tokens,