From 91f273660de6c8d37f1dfc72444b26b862eb3297 Mon Sep 17 00:00:00 2001 From: lyx <2027667395@qq.com> Date: Mon, 25 Mar 2024 17:39:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BA=A7=E5=93=81=E8=B5=94=E5=81=BF?= =?UTF-8?q?=E8=B4=B9=E7=94=A8=E6=97=A0=E8=AE=A1=E7=AE=97=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=20fix=20#481?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/client/custom-components/RecordFeeConverted.tsx | 6 +++--- .../src/client/custom-components/RecordFeeConvertedRead.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConverted.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConverted.tsx index 497a59e97..16d37ad62 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConverted.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConverted.tsx @@ -100,9 +100,9 @@ export const RecordFeeConvertedAmount: CustomFunctionComponent = () => { } else if (feeRule.conversion_logic_id === ConversionLogics.ProductWeight) { calcValue = calcValue * productData.weight; } else { - const weightItem = feeRule.conversion_logic?.weight_items.find((item) => { - item.product_id - 99999 === category.id || item.product_id === productData.id; - }); + const weightItem = feeRule.conversion_logic?.weight_items.find( + (item) => item.product_id - 99999 === category.id || item.product_id === productData.id, + ); if (!weightItem) return; if (weightItem.conversion_logic_id === ConversionLogics.Keep) { calcValue = calcValue * weightItem.weight; diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConvertedRead.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConvertedRead.tsx index 46de89457..bd60f633e 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConvertedRead.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordFeeConvertedRead.tsx @@ -95,9 +95,9 @@ export const ReadFeeConvertedAmount: CustomFunctionComponent = () => { } else if (feeRule.conversion_logic_id === ConversionLogics.ProductWeight) { calcValue = calcValue * productData.weight; } else { - const weightItem = feeRule.conversion_logic.weight_items.find((item) => { - item.product_id - 99999 === category.id || item.product_id === productData.id; - }); + const weightItem = feeRule.conversion_logic.weight_items.find( + (item) => item.product_id - 99999 === category.id || item.product_id === productData.id, + ); if (!weightItem) return; if (weightItem.conversion_logic_id === ConversionLogics.Keep) { calcValue = calcValue * weightItem.weight;