Commit e1ed96a
authored
Fix out of bound index in chat paging (#3480)
closes #3478
`useIsomorphicLayoutEffect` wasn't being called until the first render
meaning if the index could be out of bounds if the parent message was
changed to a tree with less siblings than the previous. A simple min
against the number of siblings prevents the out of bound index and then
`useIsomorphicLayoutEffect ` is called the next frame, setting the
correct thread.1 parent 7885202 commit e1ed96a
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
0 commit comments