Skip to content

Commit

Permalink
fix date not updating on day change
Browse files Browse the repository at this point in the history
setting of dateTimeP variable was missing `.children` for the case when there isn't a caption
  • Loading branch information
ktownsend-personal authored Aug 13, 2020
1 parent f1179ca commit 61a2c2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist/clock-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class ClockCard extends HTMLElement {
card.appendChild(this.content);
this.appendChild(card);
var canvas = this.content.children[0];
var dateTimeP = config.display_date ? caption ? this.content.children[2] : this.content[1] : null;
var dateTimeP = config.display_date ? caption ? this.content.children[2] : this.content.children[1] : null;
var ctx = canvas.getContext("2d");
var radius = canvas.height / 2;
ctx.translate(radius, radius);
Expand Down Expand Up @@ -181,4 +181,4 @@ class ClockCard extends HTMLElement {
}
}

customElements.define('clock-card', ClockCard);
customElements.define('clock-card', ClockCard);

0 comments on commit 61a2c2e

Please sign in to comment.