From 58101328c504da043716d545f6e44bee2259ca55 Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Sat, 26 Apr 2025 15:59:49 +0800 Subject: [PATCH] fix: handle optional user_group_ratio in LogsTable and render helper --- web/src/components/LogsTable.js | 3 +-- web/src/helpers/render.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/web/src/components/LogsTable.js b/web/src/components/LogsTable.js index 551551da..a71cde60 100644 --- a/web/src/components/LogsTable.js +++ b/web/src/components/LogsTable.js @@ -920,7 +920,6 @@ const LogsTable = () => { other.completion_ratio, other.model_price, other.group_ratio, - other.user_group_ratio, other.cache_ratio || 1.0, other.cache_creation_ratio || 1.0, ) @@ -929,7 +928,7 @@ const LogsTable = () => { other.completion_ratio, other.model_price, other.group_ratio, - other.user_group_ratio, + other?.user_group_ratio, ), }); } diff --git a/web/src/helpers/render.js b/web/src/helpers/render.js index 6ea8e6de..7b80da6f 100644 --- a/web/src/helpers/render.js +++ b/web/src/helpers/render.js @@ -448,8 +448,8 @@ export function renderLogContent( user_group_ratio, image = false, imageRatio = 1.0, + useUserGroupRatio = undefined ) { - const useUserGroupRatio = isValidGroupRatio(user_group_ratio); const ratioLabel = useUserGroupRatio ? i18next.t('专属倍率') : i18next.t('分组倍率'); const ratio = useUserGroupRatio ? user_group_ratio : groupRatio;