mardi 26 janvier 2016

Ember .get doesn't return correct value

So i have this ember object "lineup", when i use

lineup.get('stations').length = 396

but it is wrong, if i inspect that object, and use _data

lineup._data.length = 429

it is the correct one,

Lineup stations is got from ember-data request payload manipulation like this

if (payload.stations) {
     payload.stations = payload.stations.map(function(s) {
         s.logo = s.logoFilename ? 'http://ift.tt/1NxbTCC'+s.logoFilename : null;
         delete s.logoFilename;
         return Ember.Object.create(s);
      });
}

any ideas?




Aucun commentaire:

Enregistrer un commentaire