Commit 2f02b36
committed
fix: handle empty segment array in TimelineSegments props update (#331)
The propSegments useEffect guard used propSegments.length > 0 which
blocked the props-based update path when all recordings were deleted
(empty array case). While the timelineState subscription compensated for
this via its own update path, the guard was semantically incorrect.
Replace the length guard with Array.isArray() so that any valid array
(including an empty one after all recordings are deleted) correctly
updates the component's local segment state via both the props path and
the subscription path.1 parent ce89bfc commit 2f02b36
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
0 commit comments