Skip to content

Commit ed0833b

Browse files
authored
Merge pull request #284 from github/smockle/untitled
fix: Move `noTitle` conditional.
2 parents 534ce30 + 257f0eb commit ed0833b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/relative-time-element.ts

+2-2
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)