8000 Merge branch 'main' into fix/relative-time-at-end-of-longer-months · github/relative-time-element@60fb1ef · GitHub
[go: up one dir, main page]

Skip to content

Commit 60fb1ef

Browse files
authored
Merge branch 'main' into fix/relative-time-at-end-of-longer-months
2 parents fd85788 + ed0833b commit 60fb1ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/relative-time-element.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,9 @@ export class RelativeTimeElement extends HTMLElement implements Intl.DateTimeFor
440440
return
441441
}
442442
const now = Date.now()
443-
if (!this.#customTitle && !this.noTitle) {
443+
if (!this.#customTitle) {
444444
newTitle = this.#getFormattedTitle(date) || ''
445-
if (newTitle) this.setAttribute('title', newTitle)
445+
if (newTitle && !this.noTitle) this.setAttribute('title', newTitle)
446446
}
447447

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

0 commit comments

Comments
 (0)
0