FIX: Don't modify variables when rendering

This commit is contained in:
Robin Ward 2016-11-24 11:34:14 -05:00
parent 5ba653d604
commit 054c428ba3

View File

@ -40,8 +40,10 @@ export default Ember.Component.extend({
didInsertElement() {
this._super();
Ember.run.scheduleOnce('afterRender', () => {
this.set("numOfVotersToShow", Math.round(this.$().width() / 25) * 2);
if (this.get("voterIds").length > 0) this._fetchUsers();
});
},
actions: {