Skip to content
Loading
TypeError: Cannot read property 'map' of undefined 
0
  • Ganesan C
    You have to check null and length condition beofre going to loop.
     
    1. {  
    2.     this.state.emps && this.state.emps.length > 0 && this.state.emps.map(emp =>  
    3.       "foo">  
    4.         class="centered">{emp.points}  
    5.       
      
  •     )  
  •   }  
  • 0