You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(timeline): carry the rounded second in the last two copies too
format.ts was only two of the three places that floored the minute field off
the raw value while rounding the second field off it separately, so `0:60.0`
stayed renderable in the two this PR had not reached.
TransportBar's `formatTC` was `formatSec` verbatim — same output for every
input, junk guard written differently — so it just goes, and the transport bar
imports the shared one. That is the copy that mattered: it feeds the live
playhead readout, so the bad string showed up there once a minute during
playback, which is the place a user is most likely to actually see it.
LeftPanel's `formatTimecode` is a genuinely different shape (`h:mm:ss.t`, hours
always shown), so it keeps formatting itself rather than being forced into one
of format.ts's two shapes. It now shares `splitRoundedTime`, which is what this
PR added and the only part that must not be re-derived. Fixed a second bug while
there: `padStart(3, "0")` never padded anything, because `(5).toFixed(1)` is
already three characters — a single-digit second rendered `0:00:5.0`.
Also tightened the two `Number.MAX_VALUE` cases. `not.toMatch(/Infinity|NaN/)`
passes against the pre-carry implementation too, so it pinned nothing; asserting
the exact string means a regression is actually caught.
0 commit comments