Skip to content

Commit

Permalink
fix: nan monthly cost (#201)
Browse files Browse the repository at this point in the history
* fix: nan monthly cost

fixes #200

Resolves issue where if monthlyCost was `undefined` we were mistakenly adding it to the cost total.

* chore: bump version
  • Loading branch information
hugorut authored Sep 27, 2023
1 parent 5cdb760 commit c8aaead
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "infracost",
"displayName": "Infracost",
"description": "Cloud cost estimates for Terraform in your editor",
"version": "0.2.17",
"version": "0.2.18",
"publisher": "Infracost",
"license": "Apache-2.0",
"icon": "infracost-logo.png",
Expand Down
2 changes: 1 addition & 1 deletion src/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class Block {
let cost = 0;

for (const r of this.resources) {
if (r.monthlyCost === null) {
if (r.monthlyCost == null) {
r.monthlyCost = 0;
}

Expand Down

0 comments on commit c8aaead

Please sign in to comment.