From 87245462e27c8efbead185a4cb91de7ad904bf76 Mon Sep 17 00:00:00 2001 From: wjh Date: Thu, 16 May 2024 16:48:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E5=8D=95=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=20(#998)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/998 Co-authored-by: wjh Co-committed-by: wjh --- .../plugin-rental/src/server/services/settlement-service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/settlement-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/settlement-service.ts index 3722156f8..cce94a897 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/settlement-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/settlement-service.ts @@ -536,7 +536,9 @@ export class SettlementService { dayjs(item.date).isBetween(ruleItem.start_date, ruleItem.end_date, 'day', '[]') && dayjs(item.date).isSameOrAfter(settlementAbout.start_date) ) { - const feeItem = item?.record_items.filter((value) => value.product_id === rule.fee_product_id); + const feeItem = item?.record_items.filter( + (value) => value && value.product_id === rule.fee_product_id, + ); if (feeItem.length) { feeItem.forEach((value) => { if (category === '其他') {