Skip to content

Commit

Permalink
Merge branch 'main' into fix/relative-time-at-end-of-longer-months
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus authored Jun 7, 2024
2 parents fd85788 + ed0833b commit 60fb1ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/relative-time-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,9 @@ export class RelativeTimeElement extends HTMLElement implements Intl.DateTimeFor
return
}
const now = Date.now()
if (!this.#customTitle && !this.noTitle) {
if (!this.#customTitle) {
newTitle = this.#getFormattedTitle(date) || ''
if (newTitle) this.setAttribute('title', newTitle)
if (newTitle && !this.noTitle) this.setAttribute('title', newTitle)
}

const duration = elapsedTime(date, this.precision, now)
Expand Down

0 comments on commit 60fb1ef

Please sign in to comment.