title: React - Accessing nested objects in returned data
body: <p>I'm using <code>fetch</code> to return some data from a local API. I'm able to return the data and set the state. However, in my <code>render()</code> function when using <code>map</code> and attempting to access anything deeper than the top level object in the data I get an <code>undefined</code> error. I can correctly log any level of the data that I want to the console, but I don't have access to it within the rendered component. </p>
  
  <pre><code>constructor(props) {
    super(props);
    this.state ={
      verifications: []
    }
  }
  
  componentWillMount(){
    fetch('http://localhost:3001/verifications')
      .then(response =&gt; response.json())
      .then((verifications) =&gt; {
        this.setState({verifications})
        console.log(this.state);
      });
  }
  </code></pre>
  
  <p>and in my render</p>
  
  <pre><code>{this.state.verifications.map(verification =&gt;
    &lt;div key={verification._id}&gt;
      &lt;ReviewListItem
        hasAvatar={true}
        imageUrl={verification.supplier.logo}
        title={verification.supplier.companyName}
        description={verification.tasks.length}
      /&gt;
    &lt;/div&gt;
  )}
  </code></pre>
  
  <p>This is the error I get:
  <code>Unhandled Rejection (TypeError): Cannot read property 'logo' of null</code></p>
  
  <p>I've searched high and low for an answer to this, but I feel like I must be approaching this wrong. I come from Angular 1, and I'm extremely new to React. Maybe I'm having a hard time grasping the concepts.</p>
  
  <p>Here's my data:</p>
  
  <pre><code>[
  {
  "_id": 1000,
  "supplier": {
  "_id": 1000,
  "companyName": "ACME Business Ventures",
  "logo": "/images/logos/suppliers/acme.jpg",
  "avettaId": "ADS83J",
  "brandColor": "#563E5E",
  "clients": [],
  "locations": [],
  "primaryContact": {},
  "address": {},
  "createdAt": "2017-06-30T17:42:23.479Z"
  },
  "tasks": [
  {
  "form": "PQF General",
  "question": "How long have you been in business?",
  "answer": "18 Years",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  },
  {
  "form": "PQF General",
  "question": "Have you had any fatalities in the last 3 years?",
  "answer": "No",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  },
  {
  "form": "Diversity Questionnaire",
  "question": "Are you a minority-owned business?",
  "answer": "Yes",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  },
  {
  "form": "Sustainability Questionnaire",
  "question": "What percentage of your business runs on renewable energy?",
  "answer": "About 55%, but that's expected to climb to 80% by next year.",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  }
  ]
  },
  {
  "_id": 2000,
  "supplier": null,
  "tasks": [
  {
  "form": "PQF General",
  "question": "How long have you been in business?",
  "answer": "18 Years",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  },
  {
  "form": "PQF General",
  "question": "Have you had any fatalities in the last 3 years?",
  "answer": "No",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  },
  {
  "form": "Diversity Questionnaire",
  "question": "Are you a minority-owned business?",
  "answer": "Yes",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  },
  {
  "form": "Sustainability Questionnaire",
  "question": "What percentage of your business runs on renewable energy?",
  "answer": "About 55%, but that's expected to climb to 80% by next year.",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  }
  ]
  },
  {
  "_id": 3000,
  "supplier": null,
  "tasks": [
  {
  "form": "PQF General",
  "question": "How long have you been in business?",
  "answer": "18 Years",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  },
  {
  "form": "PQF General",
  "question": "Have you had any fatalities in the last 3 years?",
  "answer": "No",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  },
  {
  "form": "Diversity Questionnaire",
  "question": "Are you a minority-owned business?",
  "answer": "Yes",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  },
  {
  "form": "Sustainability Questionnaire",
  "question": "What percentage of your business runs on renewable energy?",
  "answer": "About 55%, but that's expected to climb to 80% by next year.",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  }
  ]
  },
  {
  "_id": 4000,
  "supplier": null,
  "tasks": [
  {
  "form": "PQF General",
  "question": "How long have you been in business?",
  "answer": "18 Years",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  },
  {
  "form": "PQF General",
  "question": "Have you had any fatalities in the last 3 years?",
  "answer": "No",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  },
  {
  "form": "Diversity Questionnaire",
  "question": "Are you a minority-owned business?",
  "answer": "Yes",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  },
  {
  "form": "Sustainability Questionnaire",
  "question": "What percentage of your business runs on renewable energy?",
  "answer": "About 55%, but that's expected to climb to 80% by next year.",
  "status": "incomplete",
  "attachment": "",
  "comments": []
  }
  ]
  }
  ]
  </code></pre>