diff --git a/src/relative-time-element.ts b/src/relative-time-element.ts index c844a9d..660b169 100644 --- a/src/relative-time-element.ts +++ b/src/relative-time-element.ts @@ -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)