From 7dfb3085030dcbf10fefaa90ad771cebdbab980f Mon Sep 17 00:00:00 2001 From: wjh Date: Wed, 27 Mar 2024 11:11:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=AE=A1=E4=BB=B7?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E6=8A=A5=E9=94=99=20(#505)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description # Motivation # Key changes - Frontend - Backend # Test plan ## Suggestions ## Underlying risk # Showcase Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachycode/pulls/505 Co-authored-by: wjh Co-committed-by: wjh --- .../custom-components/RecordItemValuationQuantity.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemValuationQuantity.tsx b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemValuationQuantity.tsx index 5b8113589..c41c02b95 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemValuationQuantity.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/custom-components/RecordItemValuationQuantity.tsx @@ -53,7 +53,7 @@ export const RecordItemValuationQuantity = observer((props) => { (product) => product.id - 99999 === item.product?.category_id || product.id === item.product?.id, ), ); - const feeRule = ProductFeeItems.data.find((feeItem) => feeItem.fee_product_id === item.product?.id); + const feeRule = ProductFeeItems?.data.find((feeItem) => feeItem.fee_product_id === item.product?.id); let count; if (!rule && feeRule) { count = subtotal(feeRule, item, productCategory, reqWeightRules, 'fee'); @@ -93,7 +93,7 @@ export const RecordItemValuationQuantity = observer((props) => { (product) => product.id - 99999 === item.product?.category_id || product.id === item.product?.id, ), ); - const feeRule = inProductFeeItems.data.find( + const feeRule = inProductFeeItems?.data.find( (feeItem) => feeItem.fee_product_id === item.product?.id || item.product?.category_id === feeItem.fee_product.category_id, ); @@ -112,7 +112,7 @@ export const RecordItemValuationQuantity = observer((props) => { (product) => product.id - 99999 === item.product?.category_id || product.id === item.product?.id, ), ); - const contractPlain_out_fee = outProductFeeItems.data.find( + const contractPlain_out_fee = outProductFeeItems?.data.find( (feeItem) => feeItem.fee_product_id === item.product?.id || item.product?.category_id === feeItem.fee_product.category_id, ); @@ -128,7 +128,7 @@ export const RecordItemValuationQuantity = observer((props) => { (product) => product.id - 99999 === item.product?.category_id || product.id === item.product?.id, ), ); - const contractPlain_in_fee = outProductFeeItems.data.find( + const contractPlain_in_fee = outProductFeeItems?.data.find( (feeItem) => feeItem.fee_product_id === item.product?.id || item.product?.category_id === feeItem.fee_product.category_id, );