Skip to content

Commit

Permalink
ensure first observer is called at correct time
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Nov 7, 2022
1 parent 709a65b commit e7c4e8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/relative-time-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function getUnitFactor(ms: number): number {

const dateObserver = new (class {
elements: Set<RelativeTimeElement> = new Set()
time = 0
time = Infinity

observe(element: RelativeTimeElement) {
if (this.elements.has(element)) return
Expand Down

0 comments on commit e7c4e8d

Please sign in to comment.