Cannot read property 'lists' of undefined

91 Views Asked by At

I am trying to create a web application that mimics trello. I keep getting this error and im not sure how to fix it. The code works fine in another project but not when i try and add it to this new project. ALL dependencies are updated. I am running it on google chrome. I read it might be a problem with chrome?

This is the error that I am receiving on my browser. There are no errors in my IDE.

This is the code that is producing this error. The code works fine in another IDE but once I try to integrate the component into my new app it crashes.

1

There are 1 best solutions below

1
Muhammad Shahzad Ali On

Make sure you are getting array in list key in "board" Props and try to use optional Channing

{
  boar?.list?.map(..)
}

Your board props is undefined that's why you're getting this error.