From 4e936572e5cd9af32bc7d788c4d8f221adfa540e Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 16 Apr 2024 10:57:27 +0100 Subject: [PATCH] Update `filterInsuredItems()` to log when insurance items are found --- project/src/controllers/InsuranceController.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/project/src/controllers/InsuranceController.ts b/project/src/controllers/InsuranceController.ts index b07b7292..4024cb13 100644 --- a/project/src/controllers/InsuranceController.ts +++ b/project/src/controllers/InsuranceController.ts @@ -102,7 +102,13 @@ export class InsuranceController const insuranceTime = time || this.timeUtil.getTimestamp(); const profileInsuranceDetails = this.saveServer.getProfile(sessionID).insurance; - this.logger.debug(`Found ${profileInsuranceDetails.length} insurance packages in profile ${sessionID}`, true); + if (profileInsuranceDetails.length > 0) + { + this.logger.debug( + `Found ${profileInsuranceDetails.length} insurance packages in profile ${sessionID}`, + true, + ); + } return profileInsuranceDetails.filter((insured) => insuranceTime >= insured.scheduledTime); }