title: EmberJS Computed Property, Uncaught TypeError: Cannot read property 'findBy' of undefined
body: <p>I am working on an Ember CLI project (version 0.0.46)</p>
  
  <p>While trying to use Ember Arrays findBy() inside a computed property, I get following error:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'findBy' of undefined </p>
  </blockquote>
  
  <ul>
  <li>I have checked the locations array. It contains 2 objects before the findBy() is used on it.</li>
  </ul>
  
  <p><strong>Template</strong></p>
  
  <pre><code>{{view Ember.Select
       content=locations
       value=locationId
       optionValuePath="content.id"
       optionLabelPath="content.name"
       prompt="- Please select a Location -"
       class="form-control input-md"
       selection=selectedLocation
  }}
  </code></pre>
  
  <p><strong>Computed Property:</strong></p>
  
  <pre><code>selectedLocation:function(){
    var locations = this.get('controllers.xyz.locations');
    var matchedLoc =locations.findBy('id','loc2');
    return matchedLoc;
  }.property('controllers.xyz.locations')
  </code></pre>
  
  <ul>
  <li><strong>Note:</strong> For some reason, the above logic works fine when I use it inside the actions hook. Also, the locations array is null only when the first call is made to the computed property. </li>
  </ul>
  
  <p>Any help will be appreciated. Thanks!</p>