File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
packages/components/src/components/hds/time Expand file tree Collapse file tree 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 88 {{ ~#if this.hasTooltip ~}}
99 <Hds::TooltipButton
1010 class =" hds-time-wrapper"
11- {{! @glint -expect-error: FIXME: pnpm migration }}
1211 @text ={{ if
1312 display.options.tooltipFormat
1413 (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> {
8787 return this . args . hasTooltip ?? true ;
8888 }
8989
90- get isoUtcString ( ) : string | undefined {
90+ get isoUtcString ( ) : string {
9191 const date = this . date ;
9292
9393 if ( dateIsValid ( date ) ) {
94- return this . hdsTime . toIsoUtcString ( date ) ;
94+ const isoUtcString = this . hdsTime . toIsoUtcString ( date ) ;
95+
96+ if ( isoUtcString ) return isoUtcString ;
9597 }
9698
97- return undefined ;
99+ return '' ;
98100 }
99101
100102 get rangeIsoUtcString ( ) : string {
You can’t perform that action at this time.
0 commit comments