Skip to content

Commit

Permalink
Ensure string return from prettyDuration util (#3438)
Browse files Browse the repository at this point in the history
* ensure string return from prettyDuration util

* CL
  • Loading branch information
thompsongl committed May 7, 2020
1 parent 916b803 commit febff99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

- Fixed `EuiCode` and `EuiCodeBlock` from erroring in environments without a DOM implementation ([#3405](https://github.com/elastic/eui/pull/3405))
- Fixed `ApplyClassComponentDefaults` typescript utility to correctly determine defaulted properties' types ([#3430](https://github.com/elastic/eui/pull/3430))
- Fixed `prettyDuration` return type to be `string`, use fallback value ([#3438](https://github.com/elastic/eui/pull/3438))

## [`23.2.0`](https://github.com/elastic/eui/tree/v23.2.0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function prettyDuration(
return timeFrom === quickFrom && timeTo === quickTo;
}
);
if (matchingQuickRange) {
if (matchingQuickRange && matchingQuickRange.label) {
return matchingQuickRange.label;
}

Expand Down

0 comments on commit febff99

Please sign in to comment.