Skip to content

Commit f7a01aa

Browse files
committed
Uses toggleAttribute
1 parent 409d456 commit f7a01aa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ So, a relative date phrase is used for up to a month and then the actual date is
8080
| `month` | `month` | `'numeric'\|'2-digit'\|'short'\|'long'\|'narrow'\|undefined` | <sup>***</sup> |
8181
| `year` | `year` | `'numeric'\|'2-digit'\|undefined` | <sup>****</sup> |
8282
| `timeZoneName` | `time-zone-name` | `'long'\|'short'\|'shortOffset'\|'longOffset'` `\|'shortGeneric'\|'longGeneric'\|undefined` | `undefined` |
83-
| `noTitle` | `no-title` | `'boolean \| undefined'` | `undefined` |
83+
| `noTitle` | `no-title` | `-` | `-` |
8484

8585
<sup>*</sup>: If unspecified, `formatStyle` will return `'narrow'` if `format` is `'elapsed'` or `'micro'`, `'short'` if the format is `'relative'` or `'datetime'`, otherwise it will be `'long'`.
8686

src/relative-time-element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ export class RelativeTimeElement extends HTMLElement implements Intl.DateTimeFor
388388
}
389389

390390
set noTitle(value: boolean | undefined) {
391-
this.setAttribute('no-title', value?.toString() || '')
391+
this.toggleAttribute('no-title')
392392
}
393393

394394
get datetime() {

0 commit comments

Comments
 (0)