File tree 3 files changed +10
-4
lines changed
packages/components/src/components/hds/time
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @hashicorp/design-system-components " : patch
3
+ ---
4
+
5
+ ` Time ` - fixed type error where the TooltipButton text could be undefined.
Original file line number Diff line number Diff line change 8
8
{{ ~#if this.hasTooltip ~}}
9
9
<Hds::TooltipButton
10
10
class =" hds-time-wrapper"
11
- {{! @glint -expect-error: FIXME: pnpm migration }}
12
11
@text ={{ if
13
12
display.options.tooltipFormat
14
13
(hds-format-date this.date display.options.tooltipFormat )
Original file line number Diff line number Diff line change @@ -87,14 +87,16 @@ export default class HdsTime extends Component<HdsTimeSignature> {
87
87
return this . args . hasTooltip ?? true ;
88
88
}
89
89
90
- get isoUtcString ( ) : string | undefined {
90
+ get isoUtcString ( ) : string {
91
91
const date = this . date ;
92
92
93
93
if ( dateIsValid ( date ) ) {
94
- return this . hdsTime . toIsoUtcString ( date ) ;
94
+ const isoUtcString = this . hdsTime . toIsoUtcString ( date ) ;
95
+
96
+ if ( isoUtcString ) return isoUtcString ;
95
97
}
96
98
97
- return undefined ;
99
+ return '' ;
98
100
}
99
101
100
102
get rangeIsoUtcString ( ) : string {
You can’t perform that action at this time.
0 commit comments