File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/packages/frontend/chat Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -540,7 +540,7 @@ export function MessageList({
540540 // checking on folding state if it isn't a thread.
541541 const is_folded = is_thread && isFolded ( messages , message , account_id ) ;
542542 const is_thread_body = is_thread && message . get ( "reply_to" ) != null ;
543- const h = virtuosoHeightsRef . current [ index ] ;
543+ const h = virtuosoHeightsRef . current ?. [ index ] ;
544544
545545 return (
546546 < div
@@ -552,7 +552,7 @@ export function MessageList({
552552 < DivTempHeight height = { h ? `${ h } px` : undefined } >
553553 < Message
554554 messages = { messages }
555- numChildren = { numChildren [ message . get ( "date" ) . valueOf ( ) ] }
555+ numChildren = { numChildren ?. [ message . get ( "date" ) . valueOf ( ) ] }
556556 key = { date }
557557 index = { index }
558558 account_id = { account_id }
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export default function Viewer({
2828 } , [ doc ] ) ;
2929 const user_map = useTypedRedux ( "users" , "user_map" ) ;
3030 const account_id = useTypedRedux ( "account" , "account_id" ) ;
31- const { dates : sortedDates } = useMemo ( ( ) => {
31+ const { dates : sortedDates , numChildren } = useMemo ( ( ) => {
3232 return getSortedDates ( messages , "" , account_id , undefined ) ;
3333 } , [ messages ] ) ;
3434
@@ -40,6 +40,7 @@ export default function Viewer({
4040 fontSize = { font_size }
4141 mode = "standalone"
4242 sortedDates = { sortedDates }
43+ numChildren = { numChildren }
4344 />
4445 ) ;
4546}
You can’t perform that action at this time.
0 commit comments