🐛 fix: fix the wrong price when the input and output values in the ModelPrice component are 0.

This commit is contained in:
MartialBE 2024-05-15 12:26:09 +08:00
parent 8a34f76851
commit 59d3b13311
No known key found for this signature in database
GPG Key ID: 27C0267EC84B0A5C

View File

@ -85,8 +85,8 @@ export default function ModelPrice() {
model: model.id,
type: type_label?.label || '未知',
channel_type: channel_label?.label || '未知',
input: ValueFormatter(price?.input || 30),
output: ValueFormatter(price?.output || 30)
input: ValueFormatter(price?.input !== undefined && price?.input !== null ? price.input : 30),
output: ValueFormatter(price?.output !== undefined && price?.output !== null ? price.output : 30)
});
});
setRows(newRows);