Skip to content

Commit

Permalink
Nullish coalescing operator
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarnef committed Aug 5, 2024
1 parent 25d7714 commit d55f579
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/uui-relative-time/lib/uui-relative-time.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class UUIRelativeTimeElement
}

set second(value: 'numeric' | '2-digit' | undefined) {
this.setAttribute('second', value || '');
this.setAttribute('second', value ?? '');
}

get minute() {
Expand All @@ -232,7 +232,7 @@ export class UUIRelativeTimeElement
}

set minute(value: 'numeric' | '2-digit' | undefined) {
this.setAttribute('minute', value || '');
this.setAttribute('minute', value ?? '');
}

get hour() {
Expand All @@ -242,7 +242,7 @@ export class UUIRelativeTimeElement
}

set hour(value: 'numeric' | '2-digit' | undefined) {
this.setAttribute('hour', value || '');
this.setAttribute('hour', value ?? '');
}

get weekday() {
Expand All @@ -256,7 +256,7 @@ export class UUIRelativeTimeElement
}

set weekday(value: 'short' | 'long' | 'narrow' | undefined) {
this.setAttribute('weekday', value || '');
this.setAttribute('weekday', value ?? '');
}

get day() {
Expand All @@ -267,7 +267,7 @@ export class UUIRelativeTimeElement
}

set day(value: 'numeric' | '2-digit' | undefined) {
this.setAttribute('day', value || '');
this.setAttribute('day', value ?? '');
}

get month() {
Expand All @@ -291,7 +291,7 @@ export class UUIRelativeTimeElement
set month(
value: 'numeric' | '2-digit' | 'short' | 'long' | 'narrow' | undefined,
) {
this.setAttribute('month', value || '');
this.setAttribute('month', value ?? '');
}

get year() {
Expand All @@ -309,7 +309,7 @@ export class UUIRelativeTimeElement
}

set year(value: 'numeric' | '2-digit' | undefined) {
this.setAttribute('year', value || '');
this.setAttribute('year', value ?? '');
}

get timeZoneName() {
Expand Down Expand Up @@ -337,7 +337,7 @@ export class UUIRelativeTimeElement
| 'longGeneric'
| undefined,
) {
this.setAttribute('time-zone-name', value || '');
this.setAttribute('time-zone-name', value ?? '');
}

get threshold(): string {
Expand Down

0 comments on commit d55f579

Please sign in to comment.