Skip to content

Conversation

@kenzoengineer
Copy link
Member

This PR fixes a bug visible on some alert pages.

image

The predicate in the ternary fails to return true when it's supposed to because it's matching the plural and singular version of a word. e.g. in the above case, it doesn't match minutes and minute so it recurses and appends a "0 minutes".

Instead of comparing minSuffix and suffix we now just compare precision (the minimum unit) and the unit of the block.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 25, 2025
@kenzoengineer kenzoengineer marked this pull request as ready for review November 25, 2025 17:30
@kenzoengineer kenzoengineer merged commit a5fb4da into master Nov 25, 2025
48 checks passed
@kenzoengineer kenzoengineer deleted the kjiang/fix-exact-duration-formatting branch November 25, 2025 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants