File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/packages/frontend/chat Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -116,13 +116,15 @@ export function ChatLog(props: Readonly<Props>) {
116
116
scrollToBottomRef . current = ( force ?: boolean ) => {
117
117
if ( manualScrollRef . current && ! force ) return ;
118
118
manualScrollRef . current = false ;
119
- virtuosoRef . current ?. scrollToIndex ( { index : 99999999999999999999 } ) ;
119
+ virtuosoRef . current ?. scrollToIndex ( { index : Number . MAX_SAFE_INTEGER } ) ;
120
120
// sometimes scrolling to bottom is requested before last entry added,
121
121
// so we do it again in the next render loop. This seems needed mainly
122
122
// for side chat when there is little vertical space.
123
123
setTimeout (
124
124
( ) =>
125
- virtuosoRef . current ?. scrollToIndex ( { index : 99999999999999999999 } ) ,
125
+ virtuosoRef . current ?. scrollToIndex ( {
126
+ index : Number . MAX_SAFE_INTEGER ,
127
+ } ) ,
126
128
0 ,
127
129
) ;
128
130
} ;
You can’t perform that action at this time.
0 commit comments