Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
fix: Effect call is safe
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversalzburg committed Jul 11, 2021
1 parent afe0f5e commit cd4792b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/userscript/source/BulkManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ export class BulkManager {
// Get cost reduction modifier.
// TODO: This seems to be a bug, it should be `build.name`, but only if it is set.
const pricesDiscount = this._host.gamePage.getLimitedDR(
// @ts-expect-error getEffect will return 0 for invalid effects. So this is safe either way.
this._host.gamePage.getEffect(`${name}CostReduction` as const),
1
);
Expand Down

0 comments on commit cd4792b

Please sign in to comment.