File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed 
src/discussions/posts/data Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,12 @@ const usePostList = (ids) => {
1111
1212  const  sortedIds  =  useMemo ( ( )  =>  { 
1313    posts . forEach ( ( post )  =>  { 
14-       if  ( post . pinned )  { 
15-         pinnedPostsIds . push ( post . id ) ; 
16-       }  else  { 
17-         unpinnedPostsIds . push ( post . id ) ; 
14+       if  ( post )  { 
15+         if  ( post . pinned )  { 
16+           pinnedPostsIds . push ( post . id ) ; 
17+         }  else  { 
18+           unpinnedPostsIds . push ( post . id ) ; 
19+         } 
1820      } 
1921    } ) ; 
2022
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ const threadsSlice = createSlice({
9292      if  ( ! updatedPages [ page  -  1 ] )  { 
9393        updatedPages [ page  -  1 ]  =  ids ; 
9494      }  else  { 
95-         updatedPages [ page  -  1 ]  =  [ ...new  Set ( [ ... updatedPages [ page  -  1 ] ,  ...ids ] ) ] ; 
95+         updatedPages [ page  -  1 ]  =  [ ...new  Set ( [ updatedPages [ page  -  1 ] ,  ...ids ] ) ] ; 
9696      } 
9797      newState . pages  =  updatedPages ; 
9898
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments