Skip to content

Commit

Permalink
Use replaceAll with FlowFixMe
Browse files Browse the repository at this point in the history
  • Loading branch information
snowteamer committed Jan 5, 2024
1 parent 5dcaf58 commit c87d973
Show file tree
Hide file tree
Showing 2 changed files with 567 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/model/contracts/shared/time.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ export function timeSince (datems: number, dateNow: number = Date.now()): string

if (interval >= DAYS_MILLIS * 2) {
// Make sure to replace any ordinary space character by a non-breaking one.
// TODO: use .replaceAll when migrating to TS.
return humanDate(datems).replace(/\x20/g, '\xa0')
// $FlowFixMe
return humanDate(datems).replaceAll(' ', '\xa0')
}
if (interval >= DAYS_MILLIS) {
return L('1d')
Expand Down
Loading

0 comments on commit c87d973

Please sign in to comment.