Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c0aa19c5
authored
Mar 09, 2025
by
1808837298@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Add optional chaining to prevent potential undefined errors in LogsTable #833
parent
6f9412ea
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
web/src/components/LogsTable.js
+17
-17
No files found.
web/src/components/LogsTable.js
View file @
c0aa19c5
...
@@ -459,7 +459,7 @@ const LogsTable = () => {
...
@@ -459,7 +459,7 @@ const LogsTable = () => {
<>
<>
<
Space
>
<
Space
>
{
renderUseTime
(
text
)}
{
renderUseTime
(
text
)}
{
renderFirstUseTime
(
other
.
frt
)}
{
renderFirstUseTime
(
other
?
.
frt
)}
{
renderIsStream
(
record
.
is_stream
)}
{
renderIsStream
(
record
.
is_stream
)}
<
/Space
>
<
/Space
>
<
/
>
<
/
>
...
@@ -837,29 +837,29 @@ const LogsTable = () => {
...
@@ -837,29 +837,29 @@ const LogsTable = () => {
let
content
=
''
;
let
content
=
''
;
if
(
other
?.
ws
||
other
?.
audio
)
{
if
(
other
?.
ws
||
other
?.
audio
)
{
content
=
renderAudioModelPrice
(
content
=
renderAudioModelPrice
(
other
.
text_input
,
other
?
.
text_input
,
other
.
text_output
,
other
?
.
text_output
,
other
.
model_ratio
,
other
?
.
model_ratio
,
other
.
model_price
,
other
?
.
model_price
,
other
.
completion_ratio
,
other
?
.
completion_ratio
,
other
.
audio_input
,
other
?
.
audio_input
,
other
.
audio_output
,
other
?
.
audio_output
,
other
?.
audio_ratio
,
other
?.
audio_ratio
,
other
?.
audio_completion_ratio
,
other
?.
audio_completion_ratio
,
other
.
group_ratio
,
other
?
.
group_ratio
,
other
.
cache_tokens
||
0
,
other
?
.
cache_tokens
||
0
,
other
.
cache_ratio
||
1.0
,
other
?
.
cache_ratio
||
1.0
,
);
);
}
else
{
}
else
{
content
=
renderModelPrice
(
content
=
renderModelPrice
(
logs
[
i
].
prompt_tokens
,
logs
[
i
].
prompt_tokens
,
logs
[
i
].
completion_tokens
,
logs
[
i
].
completion_tokens
,
other
.
model_ratio
,
other
?
.
model_ratio
,
other
.
model_price
,
other
?
.
model_price
,
other
.
completion_ratio
,
other
?
.
completion_ratio
,
other
.
group_ratio
,
other
?.
group_rati
,
other
.
cache_tokens
||
0
,
other
?
.
cache_tokens
||
0
,
other
.
cache_ratio
||
1.0
,
other
?
.
cache_ratio
||
1.0
,
);
);
}
}
expandDataLocal
.
push
({
expandDataLocal
.
push
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment