Hello guys ,
When I click on the like button to change the icon from full to empty ( vice-versa),
the application gets crashed with this error (TypeError: Cannot read property ‘name’ of undefined
(anonymous function)
C:/Users/ceide/projects/movies-list/src/components/movies.jsx:48
45 | {this.state.movies.map(movie => (
46 |
47 | {movie.title}
48 | {movie.genre.name}
| ^ 49 | {movie.numberInStock}
50 | {movie.dailyRentalRate}
51 |
View compiled
Movies.render
C:/Users/ceide/projects/movies-list/src/components/movies.jsx:44
41 | Delete
42 |
43 |
44 |
| ^ 45 | {this.state.movies.map(movie => (
46 |
47 | {movie.title}</td