Update filterInsuredItems() to log when insurance items are found

This commit is contained in:
Dev 2024-04-16 10:57:27 +01:00
parent 62a0731cd1
commit 4e936572e5

View File

@ -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);
}