Skip to content

Commit

Permalink
fix: Add workaround for incorrect handling of maxTotalChargeUsd (#360)
Browse files Browse the repository at this point in the history
* fix: Add workaround for incorrect handling of maxTotalChargeUsd

* lint
  • Loading branch information
janbuchar authored Feb 19, 2025
1 parent 0d65d96 commit acb2abe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/apify/src/charging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export class ChargingManager {

constructor(configuration: Configuration, apifyClient: ApifyClient) {
this.maxTotalChargeUsd = configuration.get('maxTotalChargeUsd') ?? Infinity;
if (typeof this.maxTotalChargeUsd === 'string') { // TODO workaround for incorrect Configuration class behavior
this.maxTotalChargeUsd = Infinity;
}
this.isAtHome = configuration.get('isAtHome');
this.actorRunId = configuration.get('actorRunId');
this.purgeChargingLogDataset = configuration.get('purgeOnStart');
Expand Down

0 comments on commit acb2abe

Please sign in to comment.