Commit c49c101
committed
Fix relativeTime returning 'in 0 seconds' for just-created log entries
When a log entry is created fractions of a second before display,
Math.round(diff) returns 0 and format(0, 'second') produces
'in 0 seconds' rather than 'ago'. Clamp to -1 so entries always
display as '1 second ago' when the rounded value is zero.
https://claude.ai/code/session_016mM8ccmRQf7mAZQn83oZRS1 parent 48037d5 commit c49c101
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| |||
0 commit comments