Skip to content

Commit

Permalink
Fix Last Day prices (#13)
Browse files Browse the repository at this point in the history
On last month day, price_next_day_xxh vars change to price_last_day_xxh. This fix takes both.
  • Loading branch information
danimart1991 authored May 1, 2020
1 parent d774f87 commit b713916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/pvpc-hourly-pricing-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ class PVPCHourlyPricingCard extends LitElement {

getDespiction(attributes) {
const priceRegex = /price_\d\dh/;
const priceNextDayRegex = /price_next_day_\d\dh/;
const priceNextDayRegex = /price_(next|last)_day_\d\dh/;

const priceArray = Object.keys(attributes)
.filter((key) => priceRegex.test(key))
Expand Down

0 comments on commit b713916

Please sign in to comment.