title: Array.Filter and find not giving error angular 4
body: <p>I have a list and I just want to filter. Array.find and filter are all producing errors. </p>
  
  <p>Function : </p>
  
  <pre><code> setSupplierDetails(supplierId) {
  const supplier = this.suppliers.filter(tempSupplier =&gt; tempSupplier.id === supplierId)[0];
  this.supplierName = supplier.supplierName;
  </code></pre>
  
  <p>}
  Error : </p>
  
  <pre><code>ERROR TypeError: Cannot read property 'filter' of undefined
      at AddEditRestockComponent.webpackJsonp.../../../../../src/app/restock/add-edit-restock/add-edit-restock.component.ts.AddEditRestockComponent.setProductRelatedInfo 
  </code></pre>