) {
// Authorization successful, start transaction
if (
- this.setRemoteStartTransactionChargingProfile(
- chargingStation,
- transactionConnectorId,
- chargingProfile!,
- ) === true
+ (chargingProfile &&
+ this.setRemoteStartTransactionChargingProfile(
+ chargingStation,
+ transactionConnectorId,
+ chargingProfile,
+ ) === true) ??
+ !chargingProfile
) {
connectorStatus.transactionRemoteStarted = true;
if (
}
// No authorization check required, start transaction
if (
- this.setRemoteStartTransactionChargingProfile(
- chargingStation,
- transactionConnectorId,
- chargingProfile!,
- ) === true
+ (chargingProfile &&
+ this.setRemoteStartTransactionChargingProfile(
+ chargingStation,
+ transactionConnectorId,
+ chargingProfile,
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
+ ) === true) ||
+ !chargingProfile
) {
connectorStatus.transactionRemoteStarted = true;
if (