File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,8 @@ const AgendaList = (props: AgendaListProps) => {
119119 const getNextSectionIndex = ( date : string ) => {
120120 let i = 0 ;
121121 for ( let j = 1 ; j < sections . length ; j ++ ) {
122- const prev = parseDate ( sections [ j - 1 ] . title ) ;
123- const next = parseDate ( sections [ j ] . title ) ;
122+ const prev = parseDate ( sections [ j - 1 ] ? .title ) ;
123+ const next = parseDate ( sections [ j ] ? .title ) ;
124124 const cur = parseDate ( date ) ;
125125 if ( isGTE ( cur , prev ) && isGTE ( next , cur ) ) {
126126 i = sameDate ( prev , cur ) ? j - 1 : j ;
@@ -164,7 +164,7 @@ const AgendaList = (props: AgendaListProps) => {
164164 }
165165 if ( list ?. current && sectionIndex !== undefined ) {
166166 sectionScroll . current = true ; // to avoid setDate() in onViewableItemsChanged
167- _topSection . current = sections [ sectionIndex ] . title ;
167+ _topSection . current = sections [ sectionIndex ] ? .title ;
168168
169169 list ?. current . scrollToLocation ( {
170170 animated : true ,
You can’t perform that action at this time.
0 commit comments